ci: added visibility change to public for docker image publish (#1017)

This commit is contained in:
Anirban Kar 2025-01-06 13:57:16 +05:30 committed by GitHub
parent 77f8a368a2
commit f2546f12d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,7 @@ on:
permissions: permissions:
packages: write packages: write
contents: read
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
@ -74,6 +75,18 @@ jobs:
run: | run: |
docker buildx imagetools inspect ${{ steps.string.outputs.lowercase }}:${{ steps.meta.outputs.version }} docker buildx imagetools inspect ${{ steps.string.outputs.lowercase }}:${{ steps.meta.outputs.version }}
- name: Make package public
run: |
gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/user/packages/container/${{ github.event.repository.name }}/visibility" \
-f visibility='public'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Dump context - name: Dump context
if: always() if: always()
uses: crazy-max/ghaction-dump-context@v2 uses: crazy-max/ghaction-dump-context@v2