Skip to content

Commit 0185e59

Browse files
committed
fix: Restore workflow
1 parent cc70661 commit 0185e59

File tree

1 file changed

+1
-48
lines changed

1 file changed

+1
-48
lines changed

.github/workflows/build-image.yaml

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10,59 +10,12 @@ on:
1010
types:
1111
- created
1212
schedule:
13-
- cron: 00 00 * * 0
13+
- cron: 00 00 * * *
1414

1515
env:
1616
REGISTRY: ghcr.io
1717

1818
jobs:
19-
20-
test:
21-
runs-on: ubuntu-latest
22-
permissions:
23-
contents: read
24-
packages: write
25-
attestations: write
26-
id-token: write
27-
strategy:
28-
fail-fast: false
29-
matrix:
30-
include:
31-
- dockerfile: Dockerfile
32-
image_name: ${{ github.repository }}
33-
- dockerfile: Dockerfile.tools
34-
image_name: ${{ github.repository }}-tools
35-
steps:
36-
- name: Verify GHCR token permissions
37-
run: |
38-
echo "Checking GHCR permissions for ${{ env.REGISTRY }}/${{ matrix.image_name }}"
39-
response=$(curl -s -w "\n%{http_code}" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
40-
"https://${{ env.REGISTRY }}/v2/${{ matrix.image_name }}/tags/list")
41-
body=$(echo "$response" | sed '$d')
42-
status=$(echo "$response" | tail -n1)
43-
if [ "$status" = "200" ]; then
44-
echo "Token has access to list tags for ${{ matrix.image_name }}."
45-
else
46-
echo "Token does NOT have access to list tags for ${{ matrix.image_name }}. HTTP status: $status"
47-
echo "Response body:"
48-
echo "$body" | jq . || echo "$body"
49-
exit 1
50-
fi
51-
52-
- name: Output GitHub API JSON with GITHUB_TOKEN
53-
if: always()
54-
run: |
55-
echo "Full JSON response from GitHub API /repos/:owner/:repo endpoint using GITHUB_TOKEN (should always work):"
56-
repo_json=$(curl -sS -D headers.txt -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
57-
"https://api.github.com/repos/${{ github.repository }}")
58-
echo "$repo_json" | jq . || cat
59-
echo
60-
echo "Response headers from /repos/:owner/:repo endpoint as JSON:"
61-
awk -F': ' 'NF==2{gsub(/\r/,"",$2); printf "\"%s\": \"%s\",\n", $1, $2}' headers.txt | \
62-
sed '$ s/,$//' | \
63-
awk 'BEGIN{print "{"} {print} END{print "}"}'
64-
rm -f headers.txt
65-
6619
docker:
6720
runs-on: ubuntu-latest
6821
permissions:

0 commit comments

Comments
 (0)