From 837360d9d4bb94003834a1a31812ecba5095669a Mon Sep 17 00:00:00 2001 From: losuler Date: Mon, 2 May 2022 10:53:38 +1000 Subject: [PATCH] feat: add github action for updates check --- .github/workflows/main.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..722d296 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,26 @@ +name: Check for updates + +on: + schedule: + # https://crontab.guru/every-day-8am + - cron: 0 8 * * * + +jobs: + pull-request: + # https://github.com/actions/virtual-environments + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Run update check + run: echo "update_status=$(bash check-updates.sh)" >> $GITHUB_ENV + + - name: Open pull request + # https://docs.github.com/en/actions/learn-github-actions/expressions + if: contains(env.update_status, ">") + uses: repo-sync/pull-request@v2 + with: + destination_branch: "master" + github_token: ${{ secrets.GITHUB_TOKEN }} + pr_title: "Add new release" + pr_body: ${{ env.update_status }}