ci: added visibility change to public for docker image publish (#1017)
Browse files
.github/workflows/docker.yaml
CHANGED
|
@@ -12,6 +12,7 @@ on:
|
|
| 12 |
|
| 13 |
permissions:
|
| 14 |
packages: write
|
|
|
|
| 15 |
|
| 16 |
env:
|
| 17 |
REGISTRY: ghcr.io
|
|
@@ -74,6 +75,18 @@ jobs:
|
|
| 74 |
run: |
|
| 75 |
docker buildx imagetools inspect ${{ steps.string.outputs.lowercase }}:${{ steps.meta.outputs.version }}
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
- name: Dump context
|
| 78 |
if: always()
|
| 79 |
uses: crazy-max/ghaction-dump-context@v2
|
|
|
|
| 12 |
|
| 13 |
permissions:
|
| 14 |
packages: write
|
| 15 |
+
contents: read
|
| 16 |
|
| 17 |
env:
|
| 18 |
REGISTRY: ghcr.io
|
|
|
|
| 75 |
run: |
|
| 76 |
docker buildx imagetools inspect ${{ steps.string.outputs.lowercase }}:${{ steps.meta.outputs.version }}
|
| 77 |
|
| 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 |
+
|
| 90 |
- name: Dump context
|
| 91 |
if: always()
|
| 92 |
uses: crazy-max/ghaction-dump-context@v2
|