From f5bf7843a0414f3fc9fbaab0132094f47d731b79 Mon Sep 17 00:00:00 2001 From: innovaker <66737976+innovaker@users.noreply.github.com> Date: Fri, 14 May 2021 19:12:34 +0100 Subject: [PATCH] refactor: change `tag-trigger-ref` into `release-trigger-tag` Improves the readability of the workflow. PR: #37 --- .github/workflows/containers.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 2d7f289..fcd2693 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -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: |