Force a helm update #394
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: Force a helm update | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
plantrigger: | |
runs-on: ubuntu-latest | |
name: Force helm update | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: update helm | |
uses: cresta/[email protected] | |
- name: check for changes | |
id: changes | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
echo '::set-output name=CHANGES::true' | |
else | |
echo '::set-output name=CHANGES::false' | |
fi | |
- name: Create PR and auto merge it | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "Helm Autoupdate" | |
git add . | |
git commit -am "auto update helm versions" | |
git push --force origin HEAD:helm-autoupdate | |
gh pr create --head helm-autoupdate --title "auto update helm versions" --body "Updating helm to latest versions" | |
gh pr merge helm-autoupdate --auto --squash --delete-branch | |
if: steps.changes.outputs.CHANGES == 'true' | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |