File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,15 +42,16 @@ jobs:
4242 # Fetch latest upstream version
4343 UPSTREAM_VERSION="${{ steps.upstream.outputs.version }}"
4444
45- # Query GHCR for existing image tags
46- # Need package:read permission for this
45+ # Query GHCR for existing image tags - use repo-level packages API
4746 TAGS_RESPONSE=$(curl -s -H "Accept: application/vnd.github+json" \
4847 -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
4948 -H "X-GitHub-Api-Version: 2022-11-28" \
50- "https://api.github.com/orgs/${{ github.repository_owner }}/packages/container/${{ github.repository }}/versions")
49+ "https://api.github.com/repos/${{ github.repository }}/packages/container/opencode-server-docker/versions")
50+
51+ echo "GHCR response: $TAGS_RESPONSE"
5152
5253 # Find the latest upstream-* tag
53- CURRENT_VERSION=$(echo "$TAGS_RESPONSE" | jq -r '.[] | select( .metadata.container.tags[]? | startswith("upstream-")) | .metadata.container.tags[] ' 2>/dev/null | head -1 | sed 's/upstream-//')
54+ CURRENT_VERSION=$(echo "$TAGS_RESPONSE" | jq -r '.[] | .metadata.container.tags[]' 2>/dev/null | grep '^upstream-' | head -1 | sed 's/upstream-//')
5455
5556 echo "Current built version: $CURRENT_VERSION"
5657 echo "Latest upstream version: $UPSTREAM_VERSION"
You can’t perform that action at this time.
0 commit comments