mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
build-docker.yml: Only allow tags as previous version
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com> Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
127c9bdfb1
commit
74200976ad
8
.github/workflows/build-docker.yml
vendored
8
.github/workflows/build-docker.yml
vendored
@ -88,16 +88,14 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
set -ex
|
||||
if [[ -n "${{ github.base_ref }}" ]]
|
||||
then
|
||||
version="${{ github.base_ref }}"
|
||||
elif [[ "${{ env.VERSION }}" == "refs/heads/devel" ]]
|
||||
if [[ "${{ env.VERSION }}" == "refs/heads/devel" ]]
|
||||
then
|
||||
version="latest"
|
||||
else
|
||||
git checkout "${{ github.base_ref }}"
|
||||
if [[ "${{ github.ref_type }}" != "tag" ]] || ! git describe --tags > /dev/null
|
||||
then
|
||||
git fetch -fu --tags origin ${{ env.VERSION }}:${{ env.VERSION }}
|
||||
git fetch -fu --tags origin ${{ github.base_ref }}:${{ github.base_ref }}
|
||||
fi
|
||||
version="$(git describe --tags || true)"
|
||||
[[ "$version" =~ .*-.*-.* ]] || {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user