angular-cn/.github/workflows/lock-closed.yml
George Kalpakas b99b80c18b fix(dev-infra): do not run the lock-closed GitHub action on forks (#36000)
Previously, the `lock-closed` GitHub action, which runs daily and locks
closed inactive issues, was run on each fork of the `angular/angular`
repo. While the action is a [no-op on forks][1], it make still fail from
time to time, generating a confusing notification e-mail for the fork
owner.

This commit configures the `lock-closed` action to only run on the main
`angular/angular` repository (using the method suggested [here][2]).

[1]: https://github.com/angular/dev-infra/blob/13b25d383/github-actions/lock-closed/src/main.ts#L117
[2]: https://github.community/t5/GitHub-Actions/Do-not-run-cron-workflows-in-forks/td-p/46756

PR Close #36000
2020-03-11 14:45:47 -04:00

16 lines
353 B
YAML

name: Lock closed inactive issues
on:
schedule:
# Run at 16:00 every day
- cron: '0 16 * * *'
jobs:
lock_closed:
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/lock-closed@66462f6
with:
lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }}