File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -32,20 +32,24 @@ jobs:
32
32
33
33
- name : Clean install dependencies
34
34
run : npm clean-install
35
-
35
+
36
+ - name : Set up GitHub CLI
37
+ uses : cli/cli@v3
38
+
36
39
- name : Determine next alpha version
37
40
id : version
41
+ env :
42
+ GH_TOKEN : ${{ secrets.GHCR_PAT }}
38
43
run : |
39
44
BASE_VERSION=$(node -p "require('./package.json').version")
40
45
BASE_VERSION=$(echo "$BASE_VERSION" | sed 's/-.*//')
41
46
IMAGE_NAME=ghcr.io/${{ github.repository }}/podverse-api
42
47
43
- # Use a PAT with read:packages scope
44
- TOKEN="${{ secrets.GHCR_PAT }}"
45
- TAGS_JSON=$(curl -s -H "Authorization: Bearer $TOKEN" \
46
- "https://ghcr.io/v2/${{ github.repository_owner }}/podverse-api/tags/list")
48
+ # Use GitHub CLI to get tags
49
+ TAGS_JSON=$(gh api -H "Accept: application/vnd.github+json" \
50
+ /orgs/${GITHUB_REPOSITORY%/*}/packages/container/podverse-api/versions)
47
51
echo "Raw tags JSON: $TAGS_JSON"
48
- TAGS=$(echo "$TAGS_JSON" | jq -r '.tags[]' | grep "alpha" || true)
52
+ TAGS=$(echo "$TAGS_JSON" | jq -r '.[].metadata.container. tags[]' | grep "alpha" || true)
49
53
echo "Filtered alpha tags: $TAGS"
50
54
51
55
# Try to get the current alpha version (e.g., 5.1.1-alpha.3)
You can’t perform that action at this time.
0 commit comments