1
0
mirror of https://github.com/mveril/qp-demo synced 2024-12-22 12:23:49 +01: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: ./ context: ./
file: ./Dockerfile file: ./Dockerfile
push: false 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 - name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }} run: echo ${{ steps.docker_build.outputs.digest }}

View File

@ -29,10 +29,10 @@ jobs:
id: extract_docker_tag id: extract_docker_tag
shell: bash shell: bash
run: | run: |
if [ "${GITHUB_REF#refs/heads/}" == "master" ]; then if [ "${{ GITHUB_REF#refs/heads/ }}" == "master" ]; then
echo "##[set-output name=tag;]$(echo 'latest')" echo "##[set-output name=tag;]$(echo 'latest')"
elif [[ "${GITHUB_REF#refs/heads/}" == release_* ]]; then elif [[ "${{ GITHUB_REF#refs/heads/ }}" == release_* ]]; then
echo "##[set-output name=tag;]$(echo '${GITHUB_REF#refs/heads/}' | cut -d '_' -f2-)" echo "##[set-output name=tag;]$(echo '${{ GITHUB_REF#refs/heads/ }}' | cut -d '_' -f2-)"
else else
echo "##[set-output name=tag;]$(echo 'ghtest')" echo "##[set-output name=tag;]$(echo 'ghtest')"
fi fi