Merge pull request #1852 from cewert/only-run-workflows-once

This commit is contained in:
Charles Ewert 2024-07-25 10:14:10 -04:00 committed by GitHub
commit e64bcdc655
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -10,7 +10,8 @@ on:
jobs: jobs:
project: project:
if: github.repository == 'jellyfin/jellyfin-roku' # don't run job on forks and prevent job from running twice when a PR pushes a new commit
if: github.repository == 'jellyfin/jellyfin-roku' && github.event_name != 'pull_request' || github.repository == 'jellyfin/jellyfin-roku' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: Project board 📊 name: Project board 📊
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -22,7 +23,8 @@ jobs:
column: In progress column: In progress
repo-token: ${{ secrets.JF_BOT_TOKEN }} repo-token: ${{ secrets.JF_BOT_TOKEN }}
label: label:
if: github.repository == 'jellyfin/jellyfin-roku' # don't run job on forks and prevent job from running twice when a PR pushes a new commit
if: github.repository == 'jellyfin/jellyfin-roku' && github.event_name != 'pull_request' || github.repository == 'jellyfin/jellyfin-roku' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: Labeling 🏷️ name: Labeling 🏷️
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -6,6 +6,8 @@ on:
jobs: jobs:
dev: dev:
# prevent job from running twice when a PR pushes a new commit
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

View File

@ -8,6 +8,8 @@ env:
jobs: jobs:
static: static:
# don't run job on forks and prevent job from running twice when a PR pushes a new commit
if: github.repository == 'jellyfin/jellyfin-roku' && github.event_name != 'pull_request' || github.repository == 'jellyfin/jellyfin-roku' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4