Skip to content

Commit

Permalink
fix tagging for staging on release tags
Browse files Browse the repository at this point in the history
  • Loading branch information
sidpalas committed Jun 12, 2024
1 parent 4a068c9 commit 29b7fb5
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/image-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: image-ci

on:
push:
# branches:
# - "main"
branches:
- "main"
tags:
- "[0-9]*.[0-9]*.[0-9]*"

Expand Down Expand Up @@ -96,13 +96,12 @@ jobs:
env:
IMAGE_TAG: ${{ steps.generate-image-tag.outputs.image_tag }}
run: |
if [[ $GITHUB_REF == refs/heads/main ]]; then
task update-staging-image-tags NEW_TAG=${IMAGE_TAG}
elif [[ $GITHUB_REF == refs/tags/*.*.* ]]; then
# Update staging tags for push to main or release tag
task update-staging-image-tags NEW_TAG=${IMAGE_TAG}
# Update production tags only for release tags
if [[ $GITHUB_REF == refs/tags/*.*.* ]]; then
task update-production-image-tags NEW_TAG=${IMAGE_TAG}
else
echo "::error Neither main branch nor tag... something went wrong"
exit 1
fi
- name: Create Pull Request
Expand Down

0 comments on commit 29b7fb5

Please sign in to comment.