diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..3db3834 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,30 @@ +name: Update +on: + push: + branches: + - main + workflow_dispatch: + schedule: + # "At 00:00." / https://crontab.guru/#0_0_*_*_* + - cron: '0 0 * * *' + +jobs: + update: + name: Update formula + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Update formula + continue-on-error: true # This step fails when formula is up-to-date + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + git checkout -b update_formula + ./scripts/update_formula.sh + git add . + git commit -m "Update formula" + git push origin update_formula + gh pr create --title "Update formula" --body "Update formula"