Merge pull request #65 from otakulan/feature/tgh/fix-workflow-namespace #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Docker Image" | |
on: | |
push: | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- x86_64-linux | |
# Disabled for now due to qemu segfault issue | |
# - aarch64-linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/setup-qemu-action@v2 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v4 | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- run: nix run -L --system ${{ matrix.arch }} --extra-platforms ${{ matrix.arch }} .#container.copyToDockerDaemon | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Tag and push Docker image | |
run: | | |
TAG=$(nix eval '.#lanparty-seating.version' | sed s/\"//g) | |
docker tag lanparty-seating:$TAG ghcr.io/otakulan/lanparty-seating/lanparty-seating:$TAG | |
docker push ghcr.io/otakulan/lanparty-seating/lanparty-seating:$TAG |