Skip to content

Commit a5c6597

Browse files
authored
meta(gha): Deploy workflow enforce-license-compliance.yml (#1375)
1 parent 4f97850 commit a5c6597

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/enforce-license-compliance.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,28 @@ jobs:
1010
enforce-license-compliance:
1111
runs-on: ubuntu-latest
1212
steps:
13+
- name: 'Fetch FOSSA_API_KEY'
14+
id: fetch_key
15+
run: |
16+
17+
# We can't use GitHub Secrets for this key because we want it to be
18+
# available in forks. This is a push-only key for a low-privilege
19+
# account, so it is safe (enough) to expose publicly. This is a hack
20+
# to set it in one place in case we ever do need to roll it. 🤷
21+
22+
curl -O https://raw.githubusercontent.com/getsentry/.github/main/.github/workflows/FOSSA_API_KEY
23+
echo "::set-output name=key::$(cat FOSSA_API_KEY | grep -v '#')"
24+
1325
- name: 'Checkout Code'
1426
uses: actions/checkout@v2
1527

1628
- name: 'Run FOSSA Scan'
1729
uses: fossas/[email protected]
1830
with:
19-
api-key: ${{secrets.FOSSA_API_KEY}}
31+
api-key: ${{ steps.fetch_key.outputs.key }}
2032

2133
- name: 'Run FOSSA Test'
2234
uses: fossas/[email protected]
2335
with:
24-
api-key: ${{secrets.FOSSA_API_KEY}}
36+
api-key: ${{ steps.fetch_key.outputs.key }}
2537
run-tests: true

0 commit comments

Comments
 (0)