Update .gitea/workflows/actions.yaml
This commit is contained in:
@@ -26,11 +26,17 @@ jobs:
|
|||||||
}
|
}
|
||||||
- name: Lookup tag within existing package versions
|
- name: Lookup tag within existing package versions
|
||||||
run: |
|
run: |
|
||||||
curl -X 'GET' \
|
RELEASE_EXISTS=$(curl -s -L 'GET' \
|
||||||
'https://code.spamasaurus.com/api/v1/packages/djpbessems/container/filestash-enterprise' \
|
'https://code.spamasaurus.com/api/v1/packages/djpbessems/container/filestash-enterprise' \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
-H 'Authorization: token ${{ secrets.GIT_APIKEY }}' |
|
-H 'Authorization: token ${{ secrets.GIT_APIKEY }}' | \
|
||||||
jq -r 'any(.[].version; . == "${{ steps.tag.outputs.version }}")'
|
jq -r 'any(.[].version; . == "${{ steps.tag.outputs.version }}")')
|
||||||
|
|
||||||
|
[[ "$RELEASE_EXISTS" == "true" ]] && {
|
||||||
|
echo "Version already exists. Skipping build..."; exit 1
|
||||||
|
} || {
|
||||||
|
echo "Version is new. Proceeding..."; exit 0
|
||||||
|
}
|
||||||
|
|
||||||
build_container:
|
build_container:
|
||||||
name: Container image
|
name: Container image
|
||||||
|
|||||||
Reference in New Issue
Block a user