File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,18 @@ jobs:
2727
2828 - name : Check GHCR for existing images
2929 id : check_images
30+ env :
31+ TOKEN : ${{ secrets.GHCR_READ_TOKEN || secrets.GITHUB_TOKEN }}
3032 run : |
3133 missing_tags=()
32- # Fetch existing image tags from GHCR using GITHUB_TOKEN for auth
33- ghcr_tags=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
34- https://ghcr.io/v2/ophiosdev/codex-cli/tags/list | jq -r '.tags[]')
34+ # Use GitHub REST API to list container image versions (tags)
35+ ghcr_tags=$(curl -sSL \
36+ -H "Accept: application/vnd.github+json" \
37+ -H "X-GitHub-Api-Version: 2022-11-28" \
38+ -H "Authorization: Bearer ${TOKEN}" \
39+ https://api.github.com/orgs/ophiosdev/packages/container/codex-cli/versions \
40+ | jq -r '.[].metadata.container.tags[]?' 2>/dev/null || true)
41+
3542 echo "Existing GHCR tags: $ghcr_tags"
3643
3744 while IFS= read -r tag; do
You canāt perform that action at this time.
0 commit comments