Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
brucehoff committed Dec 9, 2024
1 parent 4d3b267 commit 98340c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/trivy_periodic_image_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
repo_name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
basic_creds=$(echo "dummy-user-name:${{ github.token }}" | base64)
bearer_token=$(curl -H "Authorization: Basic ${basic_creds}" https://ghcr.io/token?service=ghcr.io&scope=${repo_name}:pull | jq -r '.token' )
last_tag=$(curl -H "Authorization: Bearer ${bearer_token}" "https://ghcr.io/v2/${repo_name}/tags/list?page_size=1000" | jq -r '.tags[-1]' )
echo bearer_token ${bearer_token}
echo $(curl -H "Authorization: Bearer ${bearer_token}" "https://ghcr.io/v2/${repo_name}/tags/list?page_size=1000")
last_tag=$(curl -H "Authorization: Bearer ${bearer_token}" "https://ghcr.io/v2/${repo_name}/tags/list?page_size=1000" | jq -r '.tags[-1]')
echo "repo_name=$repo_name" >> $GITHUB_ENV
echo "last_tag=$last_tag" >> $GITHUB_ENV
outputs:
Expand Down

0 comments on commit 98340c9

Please sign in to comment.