-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.56 KB
/
upgrade-system.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Upgrade System Chart
on:
repository_dispatch:
types: [upgrade-system]
workflow_dispatch:
jobs:
upgrade:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: master
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install devbox
uses: jetify-com/[email protected]
with:
enable-cache: true
- name: Add helm repos
run: .github/add-repos.sh
- name: Install python dependencies
run: pip install -r requirements.txt
- name: Bump chart versions
run: python upgrade_system.py
- name: Check if changes detected
id: diff
run: echo "changes=$(git diff --exit-code > /dev/null || echo $?)" >> $GITHUB_OUTPUT
- name: Pre-commit
if: ${{ steps.diff.outputs.changes == '1' }}
run: devbox run pre-commit
- name: Changes
if: ${{ steps.diff.outputs.changes == '1' }}
run: |
git diff
git status
- name: Commit and push
if: ${{ steps.diff.outputs.changes == '1' }}
run: |
git add -A
git commit -m "chore: automated system version bump"
git pull
git push -u origin master
- uses: benc-uk/workflow-dispatch@v1
if: ${{ steps.diff.outputs.changes == '1' }}
with:
workflow: release.yaml
ref: master