Skip to content

Commit

Permalink
chore: only run GitHub actions when on main account (#4433)
Browse files Browse the repository at this point in the history
the most prominent case being update-copyright-years-in-license-file altering commit history in forks depending on configuration (sometimes these type of PRs just auto-merge on forks, creating a merge conflict when they sync their fork for preparing a PR)
additionally, some actions require secrets so they would fail anyway

Co-authored-by: Daniel Gibbs <[email protected]>
  • Loading branch information
Dessa and dgibbs64 authored Jan 19, 2024
1 parent e53d2a2 commit e2bdefd
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
add-to-project:
if: github.repository_owner == 'GameServerManagers'
runs-on: ubuntu-latest
steps:
- name: Add to Project
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/details-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ concurrency:

jobs:
create-matrix:
if: github.repository_owner == 'GameServerManagers'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
Expand All @@ -28,6 +29,7 @@ jobs:
echo -n "matrix=${shortnamearray}" >> $GITHUB_OUTPUT
details-check:
if: github.repository_owner == 'GameServerManagers'
needs: create-matrix
continue-on-error: true
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/git-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
gitHub-to-bitbucket:
if: github.repository_owner == 'GameServerManagers'
runs-on: ubuntu-latest
steps:
- name: SSH Agent
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ permissions:

jobs:
issue-labeler:
if: github.repository_owner == 'GameServerManagers'
runs-on: ubuntu-latest
steps:
- name: Issue Labeler
Expand All @@ -22,6 +23,7 @@ jobs:
include-title: 1

is-sponsor-label:
if: github.repository_owner == 'GameServerManagers'
runs-on: ubuntu-latest
steps:
- name: Is Sponsor Label
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ permissions:

jobs:
lock:
if: github.repository_owner == 'GameServerManagers'
runs-on: ubuntu-latest
steps:
- name: Lock Threads
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/potential-duplicates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- opened
jobs:
potential-duplicates:
if: github.repository_owner == 'GameServerManagers'
runs-on: ubuntu-latest
steps:
- name: Potential Duplicates
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/serverlist-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
serverlist-validate:
if: github.repository_owner == 'GameServerManagers'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/trigger-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
trigger_build_docker-linuxgsm:
if: github.repository_owner == 'GameServerManagers'
name: Trigger Build Docker LinuxGSM
runs-on: ubuntu-latest
steps:
Expand All @@ -18,6 +19,7 @@ jobs:
workflow_file_name: docker-publish.yml

trigger_build_docker-gameserver:
if: github.repository_owner == 'GameServerManagers'
name: Trigger Build Docker GameServer
needs: trigger_build_docker-linuxgsm
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ concurrency:

jobs:
update-check:
if: github.repository_owner == 'GameServerManagers'
continue-on-error: true
runs-on: ubuntu-latest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
update-license-year:
if: github.repository_owner == 'GameServerManagers'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ permissions:

jobs:
version-Check:
if: github.repository_owner == 'GameServerManagers'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down

0 comments on commit e2bdefd

Please sign in to comment.