From fbaa052489972bd3a994c69c5ddd81ed781f4223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Mon, 14 Jun 2021 12:15:49 +0200 Subject: [PATCH] Fix constants expression for github action --- .github/workflows/build.yml | 2 +- .github/workflows/deploy.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7357ff7..c233b0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: context: ./ file: ./Dockerfile push: false - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/qp_demo:${GITHUB_REF#refs/heads/}.${GITHUB_SHA::8} + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/qp_demo:${{ GITHUB_REF#refs/heads/ }}.${{ GITHUB_SHA::8 }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fa9e0f3..6fa92e8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,10 +29,10 @@ jobs: id: extract_docker_tag shell: bash run: | - if [ "${GITHUB_REF#refs/heads/}" == "master" ]; then + if [ "${{ GITHUB_REF#refs/heads/ }}" == "master" ]; then echo "##[set-output name=tag;]$(echo 'latest')" - elif [[ "${GITHUB_REF#refs/heads/}" == release_* ]]; then - echo "##[set-output name=tag;]$(echo '${GITHUB_REF#refs/heads/}' | cut -d '_' -f2-)" + elif [[ "${{ GITHUB_REF#refs/heads/ }}" == release_* ]]; then + echo "##[set-output name=tag;]$(echo '${{ GITHUB_REF#refs/heads/ }}' | cut -d '_' -f2-)" else echo "##[set-output name=tag;]$(echo 'ghtest')" fi