mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
update auto_release workflow
This commit is contained in:
parent
cda1b06cb0
commit
3805dda336
11
.github/workflows/auto_release.yml
vendored
11
.github/workflows/auto_release.yml
vendored
|
@ -38,11 +38,12 @@ jobs:
|
||||||
- name: Get Previous Build Number and Compute Next
|
- name: Get Previous Build Number and Compute Next
|
||||||
id: build_number
|
id: build_number
|
||||||
run: |
|
run: |
|
||||||
PREVIOUS_BUILD=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
LATEST_TAG=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
https://api.github.com/repos/${{ github.repository }}/releases | \
|
https://api.github.com/repos/${{ github.repository }}/tags | \
|
||||||
jq -r --arg FOLDER "$FOLDER_CHANGED" '.[] | select(.name | startswith($FOLDER)) | .name' | head -1 | awk -F_ '{print $3}')
|
jq -r --arg FOLDER "$FOLDER_CHANGED" '.[] | select(.name | startswith($FOLDER)) | .name' | head -1)
|
||||||
|
|
||||||
if [[ $PREVIOUS_BUILD ]]; then
|
if [[ $LATEST_TAG ]]; then
|
||||||
|
PREVIOUS_BUILD=$(echo $LATEST_TAG | awk -F_ '{print $3}')
|
||||||
NEXT_BUILD=$(printf "%03d" $((10#$PREVIOUS_BUILD + 1)))
|
NEXT_BUILD=$(printf "%03d" $((10#$PREVIOUS_BUILD + 1)))
|
||||||
else
|
else
|
||||||
NEXT_BUILD="001"
|
NEXT_BUILD="001"
|
||||||
|
|
Loading…
Reference in a new issue