Skip to content

Commit f2546f1

Browse files
authored
ci: added visibility change to public for docker image publish (#1017)
1 parent 77f8a36 commit f2546f1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/docker.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
permissions:
1414
packages: write
15+
contents: read
1516

1617
env:
1718
REGISTRY: ghcr.io
@@ -74,6 +75,18 @@ jobs:
7475
run: |
7576
docker buildx imagetools inspect ${{ steps.string.outputs.lowercase }}:${{ steps.meta.outputs.version }}
7677
78+
79+
- name: Make package public
80+
run: |
81+
gh api \
82+
--method PATCH \
83+
-H "Accept: application/vnd.github+json" \
84+
-H "X-GitHub-Api-Version: 2022-11-28" \
85+
"/user/packages/container/${{ github.event.repository.name }}/visibility" \
86+
-f visibility='public'
87+
env:
88+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89+
7790
- name: Dump context
7891
if: always()
7992
uses: crazy-max/ghaction-dump-context@v2

0 commit comments

Comments
 (0)