Skip to content

Commit

Permalink
feat: add variable gh token login
Browse files Browse the repository at this point in the history
add an input for a custom token

Signed-off-by: Caleb Woodbine <[email protected]>
  • Loading branch information
BobyMCbobs committed Jun 12, 2023
1 parent bcc177b commit 194afc6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/reusable-ko-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ on:
description: |
the path to resolvable YAML files.
see: https://ko.build/features/k8s/#ko-resolve
github-token:
required: false
default: ${{ secrets.GITHUB_TOKEN }}
type: string
description: |
a GitHub token to login to the container registry with
outputs:
images:
value: ${{ jobs.build.outputs.images }}
Expand Down Expand Up @@ -64,6 +70,9 @@ jobs:
cache-dependency-path: go.sum
check-latest: true
- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
- name: ko login ghcr.io
run: |
echo "${{ inputs.github-token }}" | ko login --password-stdin --username ${{ github.actor }} ghcr.io
- id: build
env:
KO_DOCKER_REPO: ${{ steps.run-info.outputs.ko-docker-repo }}
Expand Down

0 comments on commit 194afc6

Please sign in to comment.