42
All checks were successful
Deploy Production / Deploy to Staging (push) Has been skipped

This commit is contained in:
Alex Shevchuk
2025-08-19 17:07:03 +03:00
parent 1d0eb84d80
commit 6ec4f3579f
2 changed files with 4 additions and 6 deletions

View File

@@ -34,14 +34,10 @@ jobs:
- name: Get available versions from Docker Registry
id: get_versions
env:
REGISTRY: docker.io
REGISTRY: hub.docker.com
REPO: test-deploy
run: |
TOKEN=$(curl -s -u "${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}" \
"https://$REGISTRY/v2/token?service=$REGISTRY&scope=repository:$REPO:pull" | jq -r .token)
TAGS=$(curl -s -H "Authorization: Bearer $TOKEN" \
"https://$REGISTRY/v2/$REPO/tags/list" | jq -r '.tags[] | select(. != "latest")' | sort -rV | head -10 | tr '\n' ',')
TAGS=$(wget -q -O - "https://$REGISTRY/v2/namespaces/molvaapp/repositories/$REPO/tags?page_size=100" | jq -r '.results[].name' | tr '\n' ',')
echo "version_options=latest,${TAGS%,}" >> $GITHUB_OUTPUT