Skip to content

Commit

Permalink
Prevent release-based Github Actions from running on forks (#340)
Browse files Browse the repository at this point in the history
* Prevent release-based Github Actions from running on forks

Since release-based actions currently require @mortbopet's account
details, these actions automatically fail when run on forks. These have
been prevented in this commit by adding a conditional that runs them
only for @mortbopet's repo.

This could be expanded in the future so that forks can use their own
account info to create releases.

* Remove unnecessary conditionals
  • Loading branch information
raccog authored Mar 3, 2024
1 parent 0faf41b commit b71f0dd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
docker:
if: github.repository == 'mortbopet/Ripes'
runs-on: ubuntu-latest
steps:
-
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
release-setup:
if: github.repository == 'mortbopet/Ripes'
runs-on: ubuntu-latest
steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Ripes Tests
on:
push:
branches:
- '*'
- '**'
pull_request:

jobs:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/wasm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: WASM / Qt 6.6.0
on:
push:
branches:
- '*'
- '**'

jobs:
buildUbuntuXenial:
Expand Down Expand Up @@ -103,5 +103,6 @@ jobs:
# Dispatch the publish.yml workflow over at mortbopet.github.io
- run: |
gh workflow run publish.yml -R mortbopet/mortbopet.github.io --ref master
if: github.repository == 'mortbopet/Ripes'
env:
GH_TOKEN: ${{ secrets.MORTBOPET_GITHUB_IO_TOKEN }}

0 comments on commit b71f0dd

Please sign in to comment.