-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.23 KB
/
update_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
---
name: Update Chart
on:
workflow_dispatch:
repository_dispatch:
types: [ operator-chart-sources-updated ]
concurrency:
group: update-chart
cancel-in-progress: true
jobs:
update_chart:
runs-on: ubuntu-latest
name: Update Chart via PR
environment: update-chart
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Configure git
run: |
git config user.name "${{ github.event.sender.login }}"
git config user.email "${{ github.event.sender.login }}@users.noreply.github.com"
- name: Generate chart
run: make generate
- name: Run diff
id: diff
continue-on-error: true
run: git diff -s --exit-code
- name: Commit to branch
if: steps.diff.outcome == 'failure'
run: |
git checkout -b new-chart-${{ github.run_id }}
git add .
git commit -m "build: updated chart ${{ github.run_id }}"
git push origin new-chart-${{ github.run_id }}
- name: Create pull request
env:
GH_TOKEN: ${{ github.token }}
run: gh pr create --base main --head new-chart-${{ github.run_id }} --fill