Skip to content

Commit

Permalink
also trigger container images and linux packages on hotfix branches
Browse files Browse the repository at this point in the history
  • Loading branch information
qrkourier committed Sep 20, 2023
1 parent b8ab843 commit 5d2f1f1
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
- release-v*.*.x
- release-v*
- release-next
pull_request:
workflow_dispatch:
Expand Down Expand Up @@ -440,7 +440,7 @@ jobs:
# fail the job because we could not obtain the current version from ziti-ci
echo "ERROR: ZITI_VERSION=${ZITI_VERSION} is not a semver"
exit 1
elif [[ "${GITHUB_REF}" =~ ^refs/heads/(release-v[0-9]+\.[0-9]+\.x|main)$ ]]; then
elif [[ "${GITHUB_REF}" =~ ^refs/heads/(release-v|main$) ]]; then
# Set output parameters for release branches
echo "DEBUG: ZITI_VERSION=${ZITI_VERSION}"
echo ZITI_VERSION="${ZITI_VERSION}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -494,7 +494,10 @@ jobs:
if: ${{
!cancelled()
&& needs.publish.result == 'success'
&& github.ref == 'refs/heads/main'
&& (
github.ref == 'refs/heads/main'
|| startsWith(github.ref, 'refs/heads/release-v')
)
}}
name: Publish Release Docker Images
needs: publish
Expand All @@ -503,15 +506,19 @@ jobs:
with:
ziti-tag: ${{ needs.publish.outputs.ZITI_VERSION }}

# call on release-next and main branches to publish linux packages to
# call on release-next and release branches to publish linux packages to
# "testing" and "release" package repos in Artifactory
call-publish-linux-packages:
# - !cancelled() allows evaluating further conditional expressions even if
# needed jobs were skipped
if: ${{
!cancelled()
&& needs.publish.result == 'success'
&& (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release-next')
&& (
github.ref == 'refs/heads/main'
|| startsWith(github.ref, 'refs/heads/release-v')
|| github.ref == 'refs/heads/release-next'
)
}}
name: Publish Linux Packages
needs: publish
Expand Down

0 comments on commit 5d2f1f1

Please sign in to comment.