Skip to content

Commit bad4768

Browse files
committed
build: debug versions id json
1 parent 866136a commit bad4768

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,10 @@ jobs:
324324
local package_name=$(echo "${image_tag}" | rev | cut -d: -f2- | cut -d/ -f1 | rev)
325325
local repo_name='${{ github.repository }}'
326326
local owner='${{ github.repository_owner }}'
327-
local version_id=$(curl -s -H "Authorization: Bearer "'${{ secrets.GITHUB_TOKEN }}' \
328-
"https://api.github.com/orgs/${owner}/packages/container/${package_name}/versions" | \
329-
jq -r --arg tag "$tag" '.[] | select(.metadata.container.tags[] == $tag) | .id')
327+
local versions_json="$(curl -s -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
328+
"https://api.github.com/orgs/${owner}/packages/container/${package_name}/versions")"
329+
>&2 echo 'versions json is: '"${versions_json}"
330+
local version_id=$(echo "${versions_json}" | jq -r --arg tag "$tag" '.[] | select(.metadata.container.tags[] == $tag) | .id')
330331
local package_url="https://github.com/${repo_name}/pkgs/container/${package_name}/${version_id}?tag=${tag}"
331332
if ! [ x$output = x -o x$output = x- ]; then
332333
>>"$output" echo "${image_tag}@${package_url}"

0 commit comments

Comments
 (0)