32 lines
961 B
YAML
32 lines
961 B
YAML
name: Check for updates
|
|
|
|
on:
|
|
schedule:
|
|
# https://crontab.guru/every-day-8am
|
|
- cron: 0 8 * * *
|
|
workflow_dispatch:
|
|
|
|
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
|
|
run: echo "::set-output name=STATUS::$(bash check-updates.sh)"
|
|
id: update
|
|
|
|
- name: Open pull request
|
|
# https://docs.github.com/en/actions/learn-github-actions/expressions
|
|
#if: contains(env.update_status, 'no new')
|
|
if: contains(steps.update.outputs.STATUS, 'no new')
|
|
uses: repo-sync/pull-request@v2
|
|
with:
|
|
destination_branch: "master"
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
pr_allow_empty: true
|
|
pr_title: "Add new release"
|
|
pr_body: ${{ steps.update.outputs.STATUS }}
|