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:
parent
e0da0c996c
commit
c35e73e39c
3 changed files with 25 additions and 3 deletions
9
.github/workflows/image.yaml
vendored
9
.github/workflows/image.yaml
vendored
|
@ -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 }}
|
||||
|
|
11
.github/workflows/release.yaml
vendored
11
.github/workflows/release.yaml
vendored
|
@ -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:
|
||||
|
|
8
.github/workflows/reuse.yaml
vendored
8
.github/workflows/reuse.yaml
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue