-
Notifications
You must be signed in to change notification settings - Fork 9
66 lines (62 loc) · 2.52 KB
/
helm-release.yaml
File metadata and controls
66 lines (62 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: helm-release
permissions: {}
on:
push:
tags:
- v*
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
pages: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Parse semver string
id: semver
uses: booxmedialtd/ws-action-parse-semver@7784200024d6b3fc01253e617ec0168daf603de3 # v1.4.7
with:
input_string: ${{ github.ref_name }}
version_extractor_regex: '^v(.*)$'
- name: Install helm
id: helm
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
- name: Install Cosign
uses: sigstore/cosign-installer@ba7bc0a3fef59531c69a25acd34668d6d3fe6f22 # v4.1.0
- name: Create charts tmp directory
run: |
set -e
mkdir charts-tmp
cp -a charts/kyverno-api charts-tmp/kyverno-api
- name: Run chart-releaser
uses: stefanprodan/helm-gh-pages@0ad2bb377311d61ac04ad9eb6f252fb68e207260 #v1.7.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
linting: off
charts_dir: charts-tmp
app_version: ${{ steps.semver.outputs.fullversion }}
chart_version: ${{ steps.semver.outputs.fullversion }}
# - name: Login to GitHub Container Registry
# run: |
# helm registry login --username ${GITHUB_ACTOR} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io
# - name: Publish OCI Charts
# env:
# COSIGN_REPOSITORY: ghcr.io/${{ github.repository_owner }}/signatures
# run: |
# for dir in `find charts-tmp -maxdepth 1 -mindepth 1 -type d -print`; do
# chart=${dir##*/}
# echo "Found chart: ${chart}"
# helm package charts-tmp/${chart} --destination .dist
# helm push .dist/${chart}-*.tgz oci://ghcr.io/${{ github.repository_owner }}/charts |& tee .digest
# cosign login --username ${GITHUB_ACTOR} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io
# cosign sign --yes \
# -a "repo=${{ github.repository }}" \
# -a "workflow=${{ github.workflow }}" \
# -a "ref=${{ github.sha }}" \
# -a "kind=helm-chart" \
# ghcr.io/${{ github.repository_owner }}/charts/${chart}@$(cat .digest | awk -F "[, ]+" '/Digest/{print $NF}')
# done