Skip to content

Commit 8c8f2f3

Browse files
committed
CI: Ensure mirrored packages are public.
1 parent e43b285 commit 8c8f2f3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/mirror-base-images.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,20 @@ jobs:
8383
docker pull ${TARGET_IMAGE}
8484
docker images ${TARGET_IMAGE}
8585
echo "✓ Image verified successfully"
86+
87+
- name: Make package public
88+
if: steps.check_image.outputs.exists != 'true' || github.event.inputs.force_pull == 'true'
89+
run: |
90+
PACKAGE_NAME="mirrors%2F${{ matrix.image.target_name }}"
91+
echo "Setting package ${PACKAGE_NAME} to public visibility..."
92+
93+
gh api \
94+
--method PATCH \
95+
-H "Accept: application/vnd.github+json" \
96+
-H "X-GitHub-Api-Version: 2022-11-28" \
97+
"/orgs/${{ github.repository_owner }}/packages/container/${PACKAGE_NAME}" \
98+
-f visibility='public' \
99+
&& echo "✓ Package is now public" \
100+
|| echo "⚠ Failed to set public visibility (may already be public or need org permissions)"
101+
env:
102+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)