Skip to content

Commit

Permalink
build(ghcr.io): log in to ghcr.io before pushing containers
Browse files Browse the repository at this point in the history
Signed-off-by: Clément Nussbaumer <[email protected]>
  • Loading branch information
clementnuss committed Mar 28, 2023
1 parent 01d809e commit 2a5d8c1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,21 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: ko-build/[email protected]
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/[email protected]
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}}
Expand Down

0 comments on commit 2a5d8c1

Please sign in to comment.