Skip to content

Commit 13f3f11

Browse files
committed
chore: add system upgrade workflow
1 parent 3bb9b9d commit 13f3f11

File tree

3 files changed

+81
-3
lines changed

3 files changed

+81
-3
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
paths:
1010
- 'charts/**'
1111
- '.github/**'
12+
workflow_dispatch:
1213

1314
jobs:
1415
lint-chart:

.github/workflows/upgrade-services.yaml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,37 @@ jobs:
2626
- name: Install dependencies
2727
run: pip install -r requirements.txt
2828

29-
# - name: Bump chart versions
30-
# run: python upgrade.py
29+
- name: Bump chart versions
30+
run: python upgrade.py
3131

3232
- name: Check if changes detected
3333
id: diff
3434
run: echo "changes=$(git diff --exit-code > /dev/null || echo $?)" >> $GITHUB_OUTPUT
3535

36-
- name: Debug
36+
- name: Pre-commit
37+
if: ${{ steps.diff.outputs.changes == '1' }}
38+
run: bash pre-commit.sh
39+
40+
- name: Changes
3741
if: ${{ steps.diff.outputs.changes == '1' }}
3842
run: git diff
43+
44+
- name: Commit and push
45+
if: ${{ steps.diff.outputs.changes == '1' }}
46+
run: |
47+
git commit -m "chore: automated service version bump"
48+
git push -u origin master
49+
50+
- uses: benc-uk/workflow-dispatch@v1
51+
id: dispatcher
52+
with:
53+
workflow: upgrade-system.yaml
54+
ref: master
55+
56+
- name: Await Run ID ${{ steps.dispatcher.outputs.workflowId }}
57+
uses: Codex-/[email protected]
58+
with:
59+
token: ${{ github.token }}
60+
owner: restorecommerce
61+
repo: charts
62+
run_id: ${{ steps.dispatcher.outputs.workflowId }}

.github/workflows/upgrade-system.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Upgrade System Chart
2+
3+
on:
4+
repository_dispatch:
5+
types: [upgrade-system]
6+
workflow_dispatch:
7+
8+
jobs:
9+
upgrade:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
ref: master
17+
18+
- name: Configure Git
19+
run: |
20+
git config user.name "$GITHUB_ACTOR"
21+
git config user.email "[email protected]"
22+
23+
- name: Add helm repos
24+
run: .github/add-repos.sh
25+
26+
- name: Install dependencies
27+
run: pip install -r requirements.txt
28+
29+
- name: Bump chart versions
30+
run: python upgrade_system.py
31+
32+
- name: Check if changes detected
33+
id: diff
34+
run: echo "changes=$(git diff --exit-code > /dev/null || echo $?)" >> $GITHUB_OUTPUT
35+
36+
- name: Pre-commit
37+
if: ${{ steps.diff.outputs.changes == '1' }}
38+
run: bash pre-commit.sh
39+
40+
- name: Changes
41+
if: ${{ steps.diff.outputs.changes == '1' }}
42+
run: git diff
43+
44+
- name: Commit and push
45+
if: ${{ steps.diff.outputs.changes == '1' }}
46+
run: |
47+
git commit -m "chore: automated system version bump"
48+
git push -u origin master
49+
50+
- uses: benc-uk/workflow-dispatch@v1
51+
with:
52+
workflow: release.yaml
53+
ref: master

0 commit comments

Comments
 (0)