workflows: add more on-schedule workflows (#58710)

master
Dawid Dziurla 2020-07-28 11:11:13 +02:00 committed by GitHub
parent d2a8542b16
commit 081996d296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 5 deletions

18
.github/workflows/autocancel.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Cancel previous runs
on:
schedule:
# Once every 15 minutes
- cron: '*/15 * * * *'
jobs:
autocancel:
if: github.repository == 'Homebrew/homebrew-core'
runs-on: ubuntu-latest
steps:
- name: Cancel
uses: Homebrew/actions/cancel-previous-runs@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
workflow: tests.yml
event: pull_request

28
.github/workflows/autolabel.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Label pull requests
on:
schedule:
# Once every 30 minutes
- cron: '*/30 * * * *'
jobs:
autolabel:
if: github.repository == 'Homebrew/homebrew-core'
runs-on: ubuntu-latest
steps:
- name: Label
uses: Homebrew/actions/label-pull-requests@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
def: |
[
{
"label": "new formula",
"status": "added",
"path": "Formula/.+"
}, {
"label": "marked for removal/rejection",
"status": "removed",
"path": "Formula/.+"
}
]

View File

@ -1,4 +1,4 @@
name: Scheduled tasks
name: Publish and commit bottles on schedule
on:
schedule:
@ -15,10 +15,8 @@ jobs:
HOMEBREW_FORCE_HOMEBREW_ON_LINUX: 1
steps:
- name: Update Homebrew
run: |
brew update-reset $(brew --repo)
run: brew update-reset $(brew --repo)
- name: Run automerge
env:
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
run: |
brew pr-automerge --verbose --publish
run: brew pr-automerge --verbose --publish