Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: clean up docker-publish workflow #513

Merged
merged 2 commits into from
Jan 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
deploy:
needs: test
# !cancelled() is needed because if the whole workflow was cancelled, we don't want this job to run.
# (github.ref_type != 'tag' || needs.test.result == 'success') is needed because if `test` did run, we only want this to run if `test` succeeded.
if: (!cancelled() && (github.ref_type != 'tag' || needs.test.result == 'success'))
if: (!cancelled())
runs-on: ubuntu-latest
environment: ${{ github.ref_type != 'tag' && github.ref_name || contains(github.ref, '-rc') && 'test' || 'prod' }}

Expand Down Expand Up @@ -65,13 +64,17 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Build, tag, and push image to GitHub Container Registry
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
builder: ${{ steps.buildx.outputs.name }}
build-args: GIT-SHA=${{ github.sha }}
cache-from: type=gha,scope=cal-itp
Expand Down
Loading