Fix GitHub Actions Docker push permissions
- Use github.repository_owner instead of github.actor for authentication - Explicitly set IMAGE_NAME to ensure lowercase repository name - Resolves 403 Forbidden error when pushing to GHCR
This commit is contained in:
1 parent
f86d290be6
commit
589e66fb17
1 file changed
+2
-2
@@ -12,7 +12,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: ${{ github.repository_owner }}/monitor
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -35,7 +35,7 @@ jobs:
|
|||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata
|
- name: Extract metadata
|
||||||
|
|||||||
Reference in new issue
Block a user