mirror of
https://github.com/mveril/qp-demo
synced 2024-10-31 19:23:51 +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
|
||||
- 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
|
||||
id: extract_docker_tag
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ GITHUB_REF#refs/heads/ }}" == "master" ]; then
|
||||
if [ "${{ steps.extract_branch.outputs.branch }}" == "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 [[ "${{ steps.extract_branch.outputs.branch }}" == release_* ]]; then
|
||||
echo "##[set-output name=tag;]$(echo '${GITHUB_REF#refs/heads/}' | cut -d '_' -f2-)"
|
||||
else
|
||||
echo "##[set-output name=tag;]$(echo 'ghtest')"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user