-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.24 KB
/
release.yaml
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
name: Release Charts
on:
push:
branches:
- main
jobs:
release:
permissions:
packages: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: Set Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install deps
run: npm i -q --no-save @semantic-release/exec @semantic-release/git
- name: Release a new version
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
- name: Setup Helm
uses: azure/setup-helm@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Login to GHCR
run: echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin
- name: Package Chart
run: helm package .
- name: Build Helm repository name
run: echo "HELM_REPOSITORY_OWNER=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: ${{ github.repository_owner }}
- name: Push charts to GHCR
run: helm push ./sniffer-*.tgz oci://ghcr.io/${{ env.HELM_REPOSITORY_OWNER }}