1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

fix: ko login (#4425)

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-08-26 18:56:27 +02:00 committed by GitHub
parent e0da0c996c
commit c35e73e39c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 3 deletions

View file

@ -17,6 +17,9 @@ jobs:
publish_command: ko-build-initContainer
image_name: kyvernopre
tag: image
secrets:
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.CR_PAT }}
push-kyverno:
uses: ./.github/workflows/reuse.yaml
@ -24,6 +27,9 @@ jobs:
publish_command: ko-build-kyverno
image_name: kyverno
tag: image
secrets:
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.CR_PAT }}
push-kyverno-cli:
uses: ./.github/workflows/reuse.yaml
@ -31,3 +37,6 @@ jobs:
publish_command: ko-build-cli
image_name: kyverno-cli
tag: image
secrets:
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.CR_PAT }}

View file

@ -16,6 +16,9 @@ jobs:
image_name: kyvernopre
tag: release
main: cmd/initContainer
secrets:
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.CR_PAT }}
release-kyverno:
permissions:
@ -28,6 +31,9 @@ jobs:
image_name: kyverno
tag: release
main: cmd/kyverno
secrets:
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.CR_PAT }}
release-kyverno-cli:
permissions:
@ -40,7 +46,10 @@ jobs:
image_name: kyverno-cli
tag: release
main: cmd/cli/kubectl-kyverno
secrets:
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.CR_PAT }}
create-release:
runs-on: ubuntu-latest
needs:

View file

@ -14,7 +14,11 @@ on:
type: string
main:
type: string
secrets:
registry_username:
required: true
registry_password:
required: true
jobs:
build:
runs-on: ubuntu-latest
@ -102,7 +106,7 @@ jobs:
id: ko-build-dev
if: ${{inputs.tag == 'image' && steps.extract_branch.outputs.branch == 'main'}}
run: |
echo "::set-output name=digest::$(REGISTRY=ghcr.io GITHUB_TOKEN=${{github.token}} make ${{inputs.publish_command}}-dev)"
echo "::set-output name=digest::$(REGISTRY=ghcr.io GITHUB_TOKEN=${{secrets.registry_password}} make ${{inputs.publish_command}}-dev)"
- name: ko build release image
id: ko-build