also trigger container images and linux packages on hotfix branches

This commit is contained in:
Kenneth Bingham
2023-09-18 20:11:59 -04:00
parent b8ab843185
commit cdd9ebe357
+16 -11
View File
@@ -4,7 +4,7 @@ on:
push:
branches:
- main
- release-v*.*.x
- release-v*
- release-next
pull_request:
workflow_dispatch:
@@ -84,6 +84,7 @@ jobs:
uses: openziti/ziti-ci@v1
- name: Build and Test
shell: bash
run: |
go install github.com/mitchellh/gox@latest
$(go env GOPATH)/bin/ziti-ci generate-build-info common/version/info_generated.go version
@@ -111,11 +112,10 @@ jobs:
go-version: '1.20.x'
- name: Install Ziti CI
# revert me
uses: qrkourier/ziti-ci@v1
# uses: openziti/ziti-ci@v1
uses: openziti/ziti-ci@v1
- name: Build and Test
shell: bash
run: |
sudo apt-get update
sudo apt-get -yq install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf gcc-aarch64-linux-gnu
@@ -370,9 +370,7 @@ jobs:
python-version: '3.7'
- name: Install Ziti CI
# revert me
uses: qrkourier/ziti-ci@v1
# uses: openziti/ziti-ci@v1
uses: openziti/ziti-ci@v1
- name: Download linux release artifact
uses: actions/download-artifact@v3
@@ -440,7 +438,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
@@ -494,7 +492,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
@@ -503,7 +504,7 @@ 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
@@ -511,7 +512,11 @@ jobs:
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