6de598dec9
refs https://github.com/TryGhost/Toolbox/issues/381 - when using `pull_request`, the workflow doesn't have permissions to write to the PR in question - there is another trigger - `pull_request_target` - but this comes with a heap of security warnings - our use of it should be OK because we're only checking out our own Action and not code from the PR - this commit also adds permissions to specify we only want write access to issues and PRs
22 lines
379 B
YAML
22 lines
379 B
YAML
name: 'Label Issues'
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
issues:
|
|
types: [opened, closed, labeled]
|
|
pull_request_target:
|
|
types: [closed, labeled]
|
|
schedule:
|
|
- cron: '0 * * * *'
|
|
|
|
permissions:
|
|
issues: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
action:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository_owner == 'TryGhost'
|
|
steps:
|
|
- uses: tryghost/label-actions@main
|