-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.13 KB
/
charts.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
name: Sync Helm charts
on:
push:
branches:
- master
paths:
- charts/**
jobs:
sync:
runs-on: ubuntu-20.04
env:
CHARTS_REPO: netsoc/charts
CHARTS_SUBDIR: iamd
steps:
- name: Checkout main repo
uses: actions/checkout@v2
with:
path: main
- name: Checkout charts repo
uses: actions/checkout@v2
with:
repository: ${{ env.CHARTS_REPO }}
persist-credentials: false
fetch-depth: 0
path: charts
- name: Update charts in main repo
run: |
rm -rf "charts/$CHARTS_SUBDIR"
cp -a ../main/charts/ ./
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update ${{ github.repository }} charts ($(echo ${{ github.sha }} | cut -c 1-8))"
working-directory: charts
- name: Push updated charts
uses: ad-m/github-push-action@master
with:
directory: charts
repository: ${{ env.CHARTS_REPO }}
github_token: ${{ secrets.CI_PAT }}