From 2a5d8c1fe1fb524a376766a947f9b50f02daabb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Nussbaumer?= Date: Tue, 28 Mar 2023 14:38:02 +0200 Subject: [PATCH] build(ghcr.io): log in to ghcr.io before pushing containers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Clément Nussbaumer --- .github/workflows/publish.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index aabe1a5..eb8def9 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -218,20 +218,21 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - uses: ko-build/setup-ko@v0.6 name: Setup ko + - name: Run ko publish for docker.io env: KO_DOCKER_REPO: docker.io/postfinance - - name: Run ko publish run: | export REF=${{ github.ref}} export COMMIT=${{ github.sha}} export FEAT=$(echo $REF | awk -F 'feat/' '{print $2}') ko publish ./cmd/kubelet-csr-approver/ --base-import-paths --platform=linux/amd64,linux/arm64,linux/arm -t $FEAT - - uses: ko-build/setup-ko@v0.6 - name: Setup ko + - name: Log in to ghcr.io registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + + - name: Run ko publish for ghcr.io/postfinance env: KO_DOCKER_REPO: ghcr.io/postfinance - - name: Run ko publish run: | export REF=${{ github.ref}} export COMMIT=${{ github.sha}}