Skip to content

Commit 8ee98d8

Browse files
authored
Merge pull request #52 from newrelic/skip-forks
Skip FOSSA for forks
2 parents 44575ce + 9eff393 commit 8ee98d8

File tree

6 files changed

+72
-18
lines changed

6 files changed

+72
-18
lines changed

.github/workflows/fossa-caos.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
check_env:
11+
runs-on: ubuntu-latest
12+
env:
13+
HAS_FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY != '' }}
14+
steps:
15+
- id: check-fossa-api-key
16+
run: echo "check=$HAS_FOSSA_API_KEY" >> "$GITHUB_OUTPUT"
17+
outputs:
18+
HAS_FOSSA_API_KEY: ${{ steps.check-fossa-api-key.outputs.check }}
19+
1020
fossa:
21+
needs: check_env
22+
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
1123
runs-on: ubuntu-latest
1224
env:
1325
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
1426
ORG: ${{ github.repository_owner }}
1527
REPO: ${{ github.repository }}
1628
CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }}
1729

18-
strategy:
19-
fail-fast: false
20-
2130
steps:
2231
- uses: actions/checkout@v3
2332
- name: Give GitHub Actions access to private crates

.github/workflows/fossa-default.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
check_env:
11+
runs-on: ubuntu-latest
12+
env:
13+
HAS_FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY != '' }}
14+
steps:
15+
- id: check-fossa-api-key
16+
run: echo "check=$HAS_FOSSA_API_KEY" >> "$GITHUB_OUTPUT"
17+
outputs:
18+
HAS_FOSSA_API_KEY: ${{ steps.check-fossa-api-key.outputs.check }}
19+
1020
fossa:
21+
needs: check_env
22+
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
1123
runs-on: ubuntu-latest
1224
env:
1325
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
1426
ORG: ${{ github.repository_owner }}
1527
REPO: ${{ github.repository }}
1628
CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }}
1729

18-
strategy:
19-
fail-fast: false
20-
2130
steps:
2231
- uses: actions/checkout@v3
2332
- id: fossa-list-targets

.github/workflows/fossa-elixir.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
check_env:
11+
runs-on: ubuntu-latest
12+
env:
13+
HAS_FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY != '' }}
14+
steps:
15+
- id: check-fossa-api-key
16+
run: echo "check=$HAS_FOSSA_API_KEY" >> "$GITHUB_OUTPUT"
17+
outputs:
18+
HAS_FOSSA_API_KEY: ${{ steps.check-fossa-api-key.outputs.check }}
19+
1020
fossa:
21+
needs: check_env
22+
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
1123
runs-on: ubuntu-latest
1224
env:
1325
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
1426
ORG: ${{ github.repository_owner }}
1527
REPO: ${{ github.repository }}
1628
CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }}
1729

18-
strategy:
19-
fail-fast: false
20-
2130
steps:
2231
- uses: actions/checkout@v3
2332
- uses: erlef/setup-beam@v1

.github/workflows/fossa-gradle.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
check_env:
11+
runs-on: ubuntu-latest
12+
env:
13+
HAS_FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY != '' }}
14+
steps:
15+
- id: check-fossa-api-key
16+
run: echo "check=$HAS_FOSSA_API_KEY" >> "$GITHUB_OUTPUT"
17+
outputs:
18+
HAS_FOSSA_API_KEY: ${{ steps.check-fossa-api-key.outputs.check }}
19+
1020
fossa:
21+
needs: check_env
22+
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
1123
runs-on: ubuntu-latest
1224
env:
1325
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
1426
ORG: ${{ github.repository_owner }}
1527
REPO: ${{ github.repository }}
1628
CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }}
1729

18-
strategy:
19-
fail-fast: false
20-
2130
steps:
2231
- name: Checkout this repo
2332
uses: actions/checkout@v4

.github/workflows/fossa-ruby-bundler.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
check_env:
11+
runs-on: ubuntu-latest
12+
env:
13+
HAS_FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY != '' }}
14+
steps:
15+
- id: check-fossa-api-key
16+
run: echo "check=$HAS_FOSSA_API_KEY" >> "$GITHUB_OUTPUT"
17+
outputs:
18+
HAS_FOSSA_API_KEY: ${{ steps.check-fossa-api-key.outputs.check }}
19+
1020
fossa:
21+
needs: check_env
22+
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
1123
runs-on: ubuntu-latest
1224
env:
1325
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
1426
ORG: ${{ github.repository_owner }}
1527
REPO: ${{ github.repository }}
1628
CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }}
1729

18-
strategy:
19-
fail-fast: false
20-
2130
steps:
2231
- uses: actions/checkout@v3
2332
- uses: ruby/setup-ruby@v1

.github/workflows/fossa-scala.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
check_env:
11+
runs-on: ubuntu-latest
12+
env:
13+
HAS_FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY != '' }}
14+
steps:
15+
- id: check-fossa-api-key
16+
run: echo "check=$HAS_FOSSA_API_KEY" >> "$GITHUB_OUTPUT"
17+
outputs:
18+
HAS_FOSSA_API_KEY: ${{ steps.check-fossa-api-key.outputs.check }}
19+
1020
fossa:
21+
needs: check_env
22+
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
1123
runs-on: ubuntu-latest
1224
env:
1325
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
1426
ORG: ${{ github.repository_owner }}
1527
REPO: ${{ github.repository }}
1628
CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }}
1729

18-
strategy:
19-
fail-fast: false
20-
2130
steps:
2231
- uses: actions/checkout@v3
2332
- name: Download newrelic.jar

0 commit comments

Comments
 (0)