Skip to content

Commit

Permalink
fix: run docker build only on tags pushed (#38)
Browse files Browse the repository at this point in the history
run docker build on release only
  • Loading branch information
montekki authored Jul 13, 2023
1 parent ff541f7 commit ee144ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Build and publish era-withdrawal-finalizer image

on:
push:
branches: ["main"]
tags:
- "*"

Expand Down Expand Up @@ -35,12 +34,14 @@ jobs:
sha=$(git rev-parse --short HEAD)
ts=$(date +%s%N | cut -b1-13)
echo "::set-output name=BUILD_ID::${sha}-${ts}"
- name: Auth to google artifact registry
run: |
gcloud auth configure-docker us-docker.pkg.dev -q
- name: Build and push Docker image
uses: docker/build-push-action@v2.7.0
if: ${{ startsWith(github.ref, 'refs/tags') }}
with:
push: true
tags: |
Expand Down

0 comments on commit ee144ab

Please sign in to comment.