Skip to content

Commit

Permalink
only push docker image from main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
wuan committed Nov 9, 2024
1 parent 18d28ce commit 643c15d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/rust.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
build-and-push-image:
runs-on: ubuntu-latest
if:
needs: build
env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -117,7 +118,7 @@ jobs:
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
push: github.ref == 'refs/heads/main'
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

Expand Down

0 comments on commit 643c15d

Please sign in to comment.