-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·75 lines (65 loc) · 1.87 KB
/
release-charts-dev.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Release Charts Dev
on:
push:
paths:
- 'charts/**'
branches:
- dev
permissions:
contents: write
packages: write
jobs:
check-version:
runs-on: ubuntu-latest
outputs:
VERSION_DEV: ${{ steps.read_version.outputs.VERSION_DEV }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read VERSION file
id: read_version
run: |
if grep -q "rc" VERSION ; then
echo "VERSION_DEV=true" >> $GITHUB_OUTPUT
else
echo "VERSION_DEV=false" >> $GITHUB_OUTPUT
fi
release:
needs: [check-version]
runs-on: ubuntu-latest
if: needs.check-version.outputs.VERSION_DEV == 'true'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: 3.10.1
- name: Run chart-releaser
uses: helm/[email protected]
with:
mark_as_latest: false
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_GENERATE_RELEASE_NOTES: true
CR_SKIP_EXISTING: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Charts to GHCR
run: |
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts
done