Prevented certain GitHub Actions workflows from running on forks

fixes https://github.com/TryGhost/Toolbox/issues/285

- without this, some of the workflows that are only useful for the core
  team will run on forks
- this commit adds checks to ensure we're running on a repo maintained
  by the TryGhost organization for a handful of workflows
This commit is contained in:
Daniel Lockyer 2022-06-01 17:54:26 -04:00
parent a6efdbf1db
commit 264678e9be
No known key found for this signature in database
GPG Key ID: D21186F0B47295AD
4 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,7 @@ on:
jobs:
automate:
runs-on: ubuntu-18.04
if: github.repository_owner == 'TryGhost'
env:
FORCE_COLOR: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -9,5 +9,6 @@ on:
jobs:
action:
runs-on: ubuntu-latest
if: github.repository_owner == 'TryGhost'
steps:
- uses: tryghost/label-actions@main

View File

@ -8,6 +8,7 @@ on:
jobs:
createComment:
runs-on: ubuntu-latest
if: github.repository_owner == 'TryGhost'
name: Create checklist comment
steps:
- uses: peter-evans/create-or-update-comment@26f07868647c398ca3d2042238c8aa620ca5d311

View File

@ -4,6 +4,7 @@ on:
- cron: '0 15 * * *'
jobs:
stale:
if: github.repository_owner == 'TryGhost'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5