Skip to content

Commit

Permalink
CI: Further refine workflow
Browse files Browse the repository at this point in the history
Should now only run once. Either on push, or on PR if the branch is not from this repo,
as changes pushed to branches on the repo will always be executed anwyay. We only want
PR workflows to trigger when the branch is from a fork, and we will use push events
for branches within the repo.

I hope this works.
  • Loading branch information
sonic2kk committed Apr 21, 2024
1 parent 40daaab commit a5984bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ on:
push:
paths:
- 'steamtinkerlaunch'
branches-ignore:
- 'refs/pull/**'
pull_request:
types: [opened, reopened, synchronize]
paths:
Expand All @@ -16,6 +14,9 @@ jobs:
shellcheck:
name: ShellCheck
runs-on: ubuntu-latest
# Source: https://stackoverflow.com/a/65946732/1952066
# a push event from the origin repo, or a PR from external repo
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'sonic2kk/steamtinkerlaunch' }}
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
Expand Down

0 comments on commit a5984bb

Please sign in to comment.