1
0
mirror of https://github.com/mveril/qp-demo synced 2024-07-03 09:56:00 +02:00

Fix constants expression for github action

This commit is contained in:
Mickaël Véril 2021-06-14 12:15:49 +02:00
parent 456545ecc1
commit fbaa052489
2 changed files with 4 additions and 4 deletions

View File

@ -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 }}

View File

@ -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