Upgrade Services Charts #11
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 Services Charts | |
on: | |
repository_dispatch: | |
types: [upgrade-services] | |
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.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 | |
- name: Commit and push | |
if: ${{ steps.diff.outputs.changes == '1' }} | |
run: | | |
git commit -m "chore: automated service version bump" | |
git push -u origin master | |
- uses: benc-uk/workflow-dispatch@v1 | |
id: dispatcher | |
with: | |
workflow: release.yaml | |
ref: master | |
- name: Await Run ID ${{ steps.dispatcher.outputs.workflowId }} | |
uses: Codex-/[email protected] | |
with: | |
token: ${{ github.token }} | |
owner: restorecommerce | |
repo: charts | |
run_id: ${{ steps.dispatcher.outputs.workflowId }} | |
- uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: upgrade-system.yaml | |
ref: master |