Skip to content

Upgrade Services Charts #168

Upgrade Services Charts

Upgrade Services Charts #168

name: Upgrade Services Charts
on:
repository_dispatch:
types: [upgrade-services]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
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.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 service version bump"
git pull
git push -u origin master
- uses: convictional/[email protected]
if: ${{ steps.diff.outputs.changes == '1' }}
with:
owner: restorecommerce
repo: charts
github_token: ${{ github.token }}
workflow_file_name: release.yaml
ref: master
propagate_failure: true
- name: Wait 10 minutes for gh pages cache expiry
if: ${{ steps.diff.outputs.changes == '1' }}
run: sleep 600
- uses: benc-uk/workflow-dispatch@v1
if: ${{ steps.diff.outputs.changes == '1' }}
with:
workflow: upgrade-system.yaml
ref: master