Skip to content

Commit

Permalink
Do not use an env var
Browse files Browse the repository at this point in the history
  • Loading branch information
compor committed Nov 4, 2024
1 parent 4e9ab6d commit 6392011
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ jobs:
build-and-publish:
runs-on: ubuntu-latest

defaults:
run:
env:
SNITCH_TOOLCHAIN_REPO: snitch-toolchain

steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -30,11 +25,11 @@ jobs:

- name: Build and Push Docker Image
run: |
docker buildx build -t ghcr.io/${{ github.repository_owner }}/${SNITCH_TOOLCHAIN_REPO}:${{ github.sha }} -f snitch/docker/Dockerfile .
docker push ghcr.io/${{ github.repository_owner }}/${SNITCH_TOOLCHAIN_REPO}:${{ github.sha }}
docker buildx build -t ghcr.io/${{ github.repository_owner }}/snitch-toolchain:${{ github.sha }} -f snitch/docker/Dockerfile .
docker push ghcr.io/${{ github.repository_owner }}/snitch-toolchain:${{ github.sha }}
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
docker buildx imagetools create ghcr.io/${{ github.repository_owner }}/${SNITCH_TOOLCHAIN_REPO}:${{ github.sha }} --tag ghcr.io/${{ github.repository_owner }}/${SNITCH_TOOLCHAIN_REPO}:latest
docker push ghcr.io/${{ github.repository_owner }}/${SNITCH_TOOLCHAIN_REPO}:latest
docker buildx imagetools create ghcr.io/${{ github.repository_owner }}/snitch-toolchain:${{ github.sha }} --tag ghcr.io/${{ github.repository_owner }}/snitch-toolchain:latest
docker push ghcr.io/${{ github.repository_owner }}/snitch-toolchain:latest
else
echo "Not on the main branch, skipping push to latest tag."
fi
Expand Down

0 comments on commit 6392011

Please sign in to comment.