From d8f986cce62ef40b4f4527b4d4a978723f31b938 Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Fri, 29 Dec 2023 15:43:25 +0400 Subject: [PATCH] Add workflow to update the formula daily --- .github/workflows/update.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/update.yml 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"