mirror of
https://github.com/mveril/qp-demo
synced 2025-01-03 10:05:57 +01:00
Fix branch name extraction
This commit is contained in:
parent
fbaa052489
commit
562ac3226a
11
.github/workflows/deploy.yml
vendored
11
.github/workflows/deploy.yml
vendored
@ -25,14 +25,19 @@ jobs:
|
|||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Extract branch name
|
||||||
|
shell: bash
|
||||||
|
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||||
|
id: extract_branch
|
||||||
|
|
||||||
- name: Get Docker tag from branch name
|
- name: Get Docker tag from branch name
|
||||||
id: extract_docker_tag
|
id: extract_docker_tag
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ GITHUB_REF#refs/heads/ }}" == "master" ]; then
|
if [ "${{ steps.extract_branch.outputs.branch }}" == "master" ]; then
|
||||||
echo "##[set-output name=tag;]$(echo 'latest')"
|
echo "##[set-output name=tag;]$(echo 'latest')"
|
||||||
elif [[ "${{ GITHUB_REF#refs/heads/ }}" == release_* ]]; then
|
elif [[ "${{ steps.extract_branch.outputs.branch }}" == 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
|
||||||
|
Loading…
Reference in New Issue
Block a user