Skip to content

Commit 8e73fa3

Browse files
committed
ci: docker: Do not hardcode our image path
Fixes the following CI build error inside of forks: buildx failed with: ERROR: failed to build: failed to solve: failed to push ghcr.io/blue-nebula/server:warnings: denied: permission_denied: The requested installation does not exist. Fixes: 0777e88 ("Automatically publish Docker images on GitHub")
1 parent c5a65e5 commit 8e73fa3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/docker.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
required: false
1818
default: false
1919

20+
env:
21+
REGISTRY: ghcr.io
22+
IMAGE_NAME: ${{ github.repository }}/server
23+
2024
jobs:
2125
build-and-push:
2226
runs-on: ubuntu-latest
@@ -36,7 +40,7 @@ jobs:
3640
- name: Log in to the Container registry
3741
uses: docker/login-action@v2
3842
with:
39-
registry: ghcr.io
43+
registry: ${{ env.REGISTRY }}
4044
username: ${{ github.actor }}
4145
password: ${{ secrets.GITHUB_TOKEN }}
4246

@@ -45,7 +49,7 @@ jobs:
4549
uses: docker/metadata-action@v4
4650
with:
4751
images: |
48-
ghcr.io/blue-nebula/server
52+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4953
tags: |
5054
type=semver,pattern={{version}},event=tag
5155
type=ref,event=branch

0 commit comments

Comments
 (0)