Skip to content

Commit

Permalink
Tools: Trying to prevent CI from running on forks
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Mar 30, 2023
1 parent 0d32570 commit a481bf1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on: [push, pull_request]

jobs:
pre_job:
if: github.repository == 'laurent22/joplin'
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
Expand All @@ -16,6 +17,7 @@ jobs:
concurrent_skipping: 'same_content_newer'

BuildAndroidDebug:
if: github.repository == 'laurent22/joplin'
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
CLAAssistant:
if: github.repository == 'laurent22/joplin'
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ permissions:
issues: write
jobs:
ProcessStaleIssues:
if: github.repository == 'laurent22/joplin'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/github-actions-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Joplin Continuous Integration
on: [push, pull_request]
jobs:
pre_job:
if: github.repository == 'laurent22/joplin'
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
Expand All @@ -12,6 +13,7 @@ jobs:
concurrent_skipping: 'same_content_newer'

Main:
if: github.repository == 'laurent22/joplin'
needs: pre_job
# We always process server or desktop release tags, because they also publish the release
if: needs.pre_job.outputs.should_skip != 'true' || startsWith(github.ref, 'refs/tags/server-v') || startsWith(github.ref, 'refs/tags/v')
Expand Down Expand Up @@ -128,6 +130,7 @@ jobs:
yarn install && cd packages/app-desktop && yarn run dist --publish=never
ServerDockerImage:
if: github.repository == 'laurent22/joplin'
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit a481bf1

Please sign in to comment.