-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.13 KB
/
chart-release.yml
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
name: Chart release
on:
push:
branches:
- main
paths:
- 'charts/**/Chart.yaml'
pull_request:
paths:
- .github/workflows/chart-release.yml
- ./hack/publish-chart.sh
permissions:
contents: write
packages: write
jobs:
publish-chart:
name: Publish chart
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Set up Helm
uses: azure/setup-helm@v4.2.0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish chart to GitHub Container Registry
if: github.event_name != 'pull_request'
run: ./hack/publish-chart.sh
- name: Publish chart to GitHub Container Registry (dry-run)
if: github.event_name == 'pull_request'
run: DRY_RUN=1 ./hack/publish-chart.sh