File tree Expand file tree Collapse file tree 3 files changed +83
-1
lines changed
Expand file tree Collapse file tree 3 files changed +83
-1
lines changed Original file line number Diff line number Diff line change 1+ name : lint
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ helm-lint :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Set up Helm
21+ 22+ with :
23+ version : v3.16.4
24+
25+ - uses : actions/setup-python@v5
26+ with :
27+ python-version : ' 3.x'
28+ check-latest : true
29+
30+ - name : Set up chart-testing
31+ 32+
33+ - name : Run chart-testing (list-changed)
34+ id : list-changed
35+ run : |
36+ changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
37+ if [[ -n "$changed" ]]; then
38+ echo "changed=true" | tee "$GITHUB_OUTPUT"
39+ fi
40+
41+ - name : Run chart lint
42+ if : steps.list-changed.outputs.changed == 'true'
43+ run : ct lint --target-branch ${{ github.event.repository.default_branch }}
Original file line number Diff line number Diff line change 2424 fetch-depth : 0
2525 fetch-tags : true
2626 - uses : release-drafter/release-drafter@v6
27+ with :
28+ commitish : main
2729 env :
2830 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ permissions:
99 contents : write
1010 packages : write
1111
12+ env :
13+ CHART_NAME : cardano-validator-watcher
14+ CHART_DIRECTORY : charts
15+ REGISTRY : oci://ghcr.io/kilnfi/charts
16+
1217jobs :
1318 goreleaser :
1419 runs-on : ubuntu-latest
3742 version : ' ~> v2'
3843 args : release --clean
3944 env :
40- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46+
47+ helm-release :
48+ runs-on : ubuntu-latest
49+ needs : goreleaser
50+ steps :
51+ - name : Checkout
52+ uses : actions/checkout@v4
53+ - name : Set up Helm
54+ 55+ with :
56+ version : v3.16.4
57+ - name : Verify Chart Version
58+ run : |
59+ TAG=$(echo ${{ github.ref_name }} | sed 's/v//')
60+ CHART_VERSION=$(yq -r .version ${{ env.CHART_DIRECTORY }}/${{ env.CHART_NAME }}/Chart.yaml)
61+ if [ "$TAG" != "${CHART_VERSION}" ]; then
62+ echo "Version mismatch: release tag ${TAG} does not match Chart.yaml version ${CHART_VERSION}"
63+ exit 1
64+ fi
65+ echo "CHART_VERSION=$CHART_VERSION" >> $GITHUB_ENV
66+ - name : Helm Registry Login
67+ run : |
68+ echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io --username ${{ env.USERNAME }} --password-stdin
69+ env :
70+ USERNAME : kilnfi
71+ - name : ' Helm Package'
72+ id : helm-package
73+ run : |
74+ helm package ${{ env.CHART_DIRECTORY }}/${{ env.CHART_NAME }} --version $CHART_VERSION
75+ - name : ' Helm Push'
76+ run : |
77+ helm push ./cardano-validator-watcher-$CHART_VERSION.tgz ${{ env.REGISTRY }}
You can’t perform that action at this time.
0 commit comments