This commit is contained in:
@@ -19,16 +19,15 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
# GITEA_TOKEN is the automatic Actions token. If your instance rejects it
|
# ACTION_TOKEN is a personal access token with package read/write scope,
|
||||||
# for registry auth, create a personal access token with package
|
# stored as a runner secret (the automatic GITEA_TOKEN doesn't work for
|
||||||
# read/write scope, save it as a repo secret (e.g. REGISTRY_TOKEN),
|
# registry auth on this instance).
|
||||||
# and use that here instead.
|
|
||||||
- name: Log in to Gitea container registry
|
- name: Log in to Gitea container registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITEA_TOKEN }}
|
password: ${{ secrets.ACTION_TOKEN }}
|
||||||
|
|
||||||
- name: Extract image metadata
|
- name: Extract image metadata
|
||||||
id: meta
|
id: meta
|
||||||
@@ -56,7 +55,7 @@ jobs:
|
|||||||
- name: Link package to repository
|
- name: Link package to repository
|
||||||
run: |
|
run: |
|
||||||
curl -sf -X POST \
|
curl -sf -X POST \
|
||||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.ACTION_TOKEN }}" \
|
||||||
"${{ github.server_url }}/api/v1/packages/${{ github.repository_owner }}/container/${{ github.event.repository.name }}/-/link/${{ github.event.repository.name }}" \
|
"${{ github.server_url }}/api/v1/packages/${{ github.repository_owner }}/container/${{ github.event.repository.name }}/-/link/${{ github.event.repository.name }}" \
|
||||||
&& echo "Package linked to repository" \
|
&& echo "Package linked to repository" \
|
||||||
|| echo "Link skipped (already linked, or token lacks permission)"
|
|| echo "Link skipped (already linked, or token lacks permission)"
|
||||||
|
|||||||
Reference in New Issue
Block a user