-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (50 loc) · 1.53 KB
/
chart.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
name: Chart
on:
push:
branches:
- main
jobs:
release:
permissions:
packages: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get chart version
run: |
CHART_VERSION=$(cat chart/Chart.yaml | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+$")
echo "CHART_VERSION=${CHART_VERSION}" >> $GITHUB_ENV
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Check if chart exists
id: chartExists
run: |
set +e
docker manifest inspect ghcr.io/henrywhitaker3/prompage-helm:v${{ env.CHART_VERSION }}
rc=$?
set -e
if [ $rc -eq 0 ]; then
echo Chart version already exists
echo "CHART_EXISTS=yes" >> $GITHUB_OUTPUT
else
echo Chart version does not exist
echo "CHART_EXISTS=no" >> $GITHUB_OUTPUT
fi
- name: Push chart
if: steps.chartExists.outputs.CHART_EXISTS == 'no'
uses: appany/[email protected]
with:
name: prompage-helm
repository: henrywhitaker3
tag: "v${{ env.CHART_VERSION }}"
path: chart
registry: ghcr.io
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
update_dependencies: 'true'