From 67a6b6617d1e62dab633a2045e7f1bc97569ec1d Mon Sep 17 00:00:00 2001 From: Oliver Kuckertz Date: Mon, 26 Sep 2022 19:31:03 +0200 Subject: [PATCH] Fix image path of untagged builds for forks --- .github/workflows/ghcr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ghcr.yaml b/.github/workflows/ghcr.yaml index 2e3417e..fef5468 100644 --- a/.github/workflows/ghcr.yaml +++ b/.github/workflows/ghcr.yaml @@ -24,7 +24,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} # publish tags to talos-vmtoolsd:version and talos-vmtoolsd:latest # publish branches to talos-vmtoolsd-unstable:branch - # based on https://medium.com/cooking-with-azure/4e39700ae14c + # requires GitHub actions access to packages to be configured - name: Publish run: | VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') @@ -35,7 +35,7 @@ jobs: docker push $IMGPATH:$VERSION docker push $IMGPATH:latest else - IMGPATH=ghcr.io/mologie/talos-vmtoolsd-unstable + IMGPATH=ghcr.io/${{ github.repository }}-unstable [ "$VERSION" == "master" ] && VERSION=latest docker build . -t $IMGPATH:$VERSION docker push $IMGPATH:$VERSION