Skip to content

Commit 51a9d0a

Browse files
isZumpomcbenjemaa
andauthored
Improve docker build workflow in forks (#337)
* Use lowercase repo name for ghcr image Instead of using hardcoded image name, take it from the repo name. This makes it work well for forks. * Update container-image.yaml * Update container-image.yaml --------- Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]>
1 parent a4c1bd4 commit 51a9d0a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/container-image.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ jobs:
2525
steps:
2626
- uses: actions/[email protected]
2727

28+
- name: Generate lowercase repository name
29+
run: |
30+
echo "REPO=${GITHUB_REPOSITORY,,}" >> "${GITHUB_ENV}"
31+
2832
- name: Docker meta
2933
id: meta
3034
uses: docker/metadata-action@v5
3135
with:
32-
images: ghcr.io/ionos-cloud/cluster-api-provider-proxmox
36+
images: ghcr.io/${{ env.REPO }}
3337

3438
- name: Login to GitHub Container Registry
3539
if: github.event_name != 'pull_request'

0 commit comments

Comments
 (0)