Fixed tag generation for releases

This commit is contained in:
Alexey Pustovalov 2021-10-18 19:12:43 +03:00
parent 221a078cbb
commit 2b95ec607c
2 changed files with 30 additions and 4 deletions

View File

@ -34,7 +34,7 @@ jobs:
os: ${{ steps.os.outputs.list }}
database: ${{ steps.database.outputs.list }}
components: ${{ steps.components.outputs.list }}
current_branch: ${{ steps.branch_info.outputs.current_branch }}
is_default_branch: ${{ steps.branch_info.outputs.is_default_branch }}
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
@ -79,7 +79,20 @@ jobs:
- name: Get branch info
id: branch_info
uses: tj-actions/branch-names@v5
run: |
github_ref="{{ github.ref }}"
result=false
if [[ "$github_ref" == "refs/tags/"* ]]; then
github_ref=${github_ref%.*}
fi
github_ref=${github_ref##*/}
if [[ "$github_ref" == "{{ env.LATEST_BRANCH }}" ]]; then
result=true
fi
echo "::set-output name=is_default_branch::$result"
build_base:
timeout-minutes: 70

View File

@ -34,7 +34,7 @@ jobs:
outputs:
os: ${{ steps.os.outputs.list }}
components: ${{ steps.components.outputs.list }}
current_branch_branch: ${{ steps.branch_info.outputs.current_branch }}
is_default_branch: ${{ steps.branch_info.outputs.is_default_branch }}
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
@ -68,7 +68,20 @@ jobs:
- name: Get branch info
id: branch_info
uses: tj-actions/branch-names@v5
run: |
github_ref="{{ github.ref }}"
result=false
if [[ "$github_ref" == "refs/tags/"* ]]; then
github_ref=${github_ref%.*}
fi
github_ref=${github_ref##*/}
if [[ "$github_ref" == "{{ env.LATEST_BRANCH }}" ]]; then
result=true
fi
echo "::set-output name=is_default_branch::$result"
build_base:
timeout-minutes: 70