From 852c08ed3d313e085e4fab12acf1bcdbf5585d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Sun, 24 Aug 2025 17:39:10 +0200 Subject: [PATCH] ci: fix ko settings after using mise (#246) --- .github/workflows/release.yaml | 8 ++++++++ .github/workflows/releaser-pleaser.yaml | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7a0c0df..7da1f8a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,4 +18,12 @@ jobs: - uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3 + - name: Prepare ko + run: | + echo "${{ github.token }}" | ko login ghcr.io --username "dummy" --password-stdin + + repo=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') + echo "KO_DOCKER_REPO=ghcr.io/${repo}" + echo "KO_DOCKER_REPO=ghcr.io/${repo}" >> $GITHUB_ENV + - run: ko build --bare --tags ${{ github.ref_name }} github.com/apricote/releaser-pleaser/cmd/rp diff --git a/.github/workflows/releaser-pleaser.yaml b/.github/workflows/releaser-pleaser.yaml index e40d6cd..8d1e62b 100644 --- a/.github/workflows/releaser-pleaser.yaml +++ b/.github/workflows/releaser-pleaser.yaml @@ -36,8 +36,7 @@ jobs: # version is released. But a new version can only be released if this job works. - run: ko build --bare --local --platform linux/amd64 --tags ci github.com/apricote/releaser-pleaser/cmd/rp - - run: mkdir -p .github/actions/releaser-pleaser - - run: "sed -i 's|image: .*$|image: docker://ghcr.io/apricote/releaser-pleaser:ci|g' action.yml" + - run: "sed -i 's|image: .*$|image: docker://ko.local:ci|g' action.yml" # Dogfood the action to make sure it works for users. - name: releaser-pleaser