refactor: change tag-trigger-ref
into release-trigger-tag
Improves the readability of the workflow. PR: #37
This commit is contained in:
parent
ae59587197
commit
f5bf7843a0
14
.github/workflows/containers.yml
vendored
14
.github/workflows/containers.yml
vendored
@ -71,8 +71,8 @@ jobs:
|
||||
LATEST_TAG=${NAME}:${MAJOR_MINOR}
|
||||
echo ::set-output name=latest-tag::${LATEST_TAG}
|
||||
|
||||
TAG_TRIGGER_REF=refs/tags/${{ env.zephyr-version }}-${{ env.zephyr-sdk-version }}
|
||||
echo ::set-output name=tag-trigger-ref::${TAG_TRIGGER_REF}
|
||||
RELEASE_TRIGGER_TAG=${{ env.zephyr-version }}-${{ env.zephyr-sdk-version }}
|
||||
echo ::set-output name=release-trigger-tag::${RELEASE_TAG}
|
||||
- name: Set up QEMU
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags') }}
|
||||
uses: docker/setup-qemu-action@v1
|
||||
@ -97,7 +97,7 @@ jobs:
|
||||
cache-to: ${{ (steps.docker-hub-login.outcome == 'success') && (matrix.target == 'dev') && format('type=registry,ref=docker.io/{0}/{1}:{2},mode=max', steps.vars.outputs.docker-hub-namespace, env.cache-repository-name, 'dev') || null }}
|
||||
push: ${{ steps.docker-hub-login.outcome == 'success' }}
|
||||
- name: Release (pull candidate, tag, push)
|
||||
if: ${{ github.ref == steps.vars.outputs.tag-trigger-ref }}
|
||||
if: ${{ github.ref == format('refs/tags/{0}', steps.vars.outputs.release-trigger-tag) }}
|
||||
run: |
|
||||
if [ "${{ steps.docker-hub-login.outcome }}" != "success" ]; then
|
||||
echo "Docker Hub must be authenticated to perform a release!"
|
||||
@ -132,13 +132,13 @@ jobs:
|
||||
MAJOR_MINOR=${MAJOR}.${MINOR}
|
||||
echo ::set-output name=major-minor::${MAJOR_MINOR}
|
||||
|
||||
TAG_TRIGGER_REF=refs/tags/${{ env.zephyr-version }}-${{ env.zephyr-sdk-version }}
|
||||
echo ::set-output name=tag-trigger-ref::${TAG_TRIGGER_REF}
|
||||
RELEASE_TRIGGER_TAG=${{ env.zephyr-version }}-${{ env.zephyr-sdk-version }}
|
||||
echo ::set-output name=release-trigger-tag::${RELEASE_TAG}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
if: ${{ github.ref == steps.vars.outputs.tag-trigger-ref }}
|
||||
if: ${{ github.ref == format('refs/tags/{0}', steps.vars.outputs.release-trigger-tag) }}
|
||||
- name: Tag
|
||||
if: ${{ github.ref == steps.vars.outputs.tag-trigger-ref }}
|
||||
if: ${{ github.ref == format('refs/tags/{0}', steps.vars.outputs.release-trigger-tag) }}
|
||||
env:
|
||||
TAG: ${{ steps.vars.outputs.major-minor }}
|
||||
run: |
|
||||
|
Loading…
Reference in New Issue
Block a user