-
Notifications
You must be signed in to change notification settings - Fork 14
45 lines (38 loc) · 1.16 KB
/
charttest.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
name: ChartSync
on:
pull_request:
branches:
- dev
env:
CHART_PATH: "${{ github.workspace }}/charts/egressd"
jobs:
release_chart:
name: Release Helm Chart
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Get release tag
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Checkout helm-charts
# The cr tool only works if the target repository is already checked out
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: castai/helm-charts
path: helm-charts
token: ${{ secrets.HELM_CHARTS_REPO_TOKEN }}
- name: Sync chart to helm-charts github
run: |
cd helm-charts
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git checkout egressd
git status
cp -r ${CHART_PATH} ./charts/egressd
git status
git add charts/egressd
git commit -m "[egressd] Update egressd chart to ${{env.RELEASE_TAG}}"
git push