Skip to content

Commit

Permalink
fix(docker.yaml): add condition to only push versioned image on bump
Browse files Browse the repository at this point in the history
  • Loading branch information
violetbrina committed Jan 30, 2025
1 parent 27bc2fd commit 06f7326
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ jobs:
docker push $DOCKER_TMP/$IMAGE_NAME:${{ github.event.pull_request.head.sha }}
echo "DOCKER_IMAGE=$DOCKER_TMP/$IMAGE_NAME:${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
- name: push production
if: ${{ github.ref_name == 'main' || github.ref_name == 'alpha' }}
- name: push production on version bump
if: ${{ github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'alpha') && startsWith(github.event.head_commit.message, 'bump:') }}
run: |
docker tag $IMAGE_NAME:${{ github.sha }} $DOCKER_MAIN/$IMAGE_NAME:$VERSION
docker push $DOCKER_MAIN/$IMAGE_NAME:$VERSION
Expand Down

0 comments on commit 06f7326

Please sign in to comment.