diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index 3b913a965..75b17b891 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -12,16 +12,12 @@ jobs: steps: - uses: actions/checkout@v4 - # Encode GITHUB_TOKEN - - name: Encode GITHUB_TOKEN - run: echo "GHCR_TOKEN=$(echo ${{ secrets.GITHUB_TOKEN }} | base64)" >> $GITHUB_ENV - # Step 1: Fetch current image manifests - name: Fetch current manifests run: | IMAGES=("twitch-chat" "twitch-events" "steam" "dota") for IMAGE in "${IMAGES[@]}"; do - MANIFEST=$(curl -H "Accept: application/vnd.oci.image.index.v1+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://ghcr.io/v2/dotabod/$IMAGE/manifests/v2.1") + MANIFEST=$(curl -s -H "Accept: application/vnd.oci.image.index.v1+json" -H "Authorization: Bearer ${{ secrets.GHA_READ_PKG }}" "https://ghcr.io/v2/dotabod/$IMAGE/manifests/v2.1") echo "OLD_${IMAGE^^}_MANIFEST=$MANIFEST" >> $GITHUB_ENV done @@ -49,7 +45,7 @@ jobs: run: | UPDATED_IMAGES="" for IMAGE in "${IMAGES[@]}"; do - NEW_MANIFEST=$(curl -H "Accept: application/vnd.oci.image.index.v1+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://ghcr.io/v2/dotabod/$IMAGE/manifests/v2.1") + NEW_MANIFEST=$(curl -H "Accept: application/vnd.oci.image.index.v1+json" -H "Authorization: Bearer ${{ secrets.GHA_READ_PKG }}" "https://ghcr.io/v2/dotabod/$IMAGE/manifests/v2.1") OLD_MANIFEST_VAR="OLD_${IMAGE^^}_MANIFEST" # Compare manifests (e.g., using digests or other relevant data) if [ "$NEW_MANIFEST" != "${!OLD_MANIFEST_VAR}" ]; then