Upgrade System Chart #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Add helm repos | |
run: .github/add-repos.sh | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
./.github/install-chart-testing.sh | |
./.github/install-helm-docs.sh | |
- 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: bash pre-commit.sh | |
- 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 |