-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: set github actions permissions (#22)
- Loading branch information
1 parent
0fbe639
commit 782c2f0
Showing
9 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,25 +19,30 @@ env: | |
Public Domain; | ||
WTFPL; | ||
Unlicense; | ||
UNLICENSED; | ||
# It has to be one line, there must be no space between packages. | ||
EXCLUDE_PACKAGES: [email protected];[email protected]; | ||
|
||
jobs: | ||
generate-matrix: | ||
name: Lists modules | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
DIRS=$(find -not \( -path \*node_modules -prune \) -type f -name yarn.lock | xargs dirname | awk -v RS='' -v OFS='","' 'NF { $1 = $1; print "\"" $0 "\"" }') | ||
DIRS=$(find -not \( -path \*node_modules -prune \) -type f -name package.json | xargs dirname | awk -v RS='' -v OFS='","' 'NF { $1 = $1; print "\"" $0 "\"" }') | ||
echo "matrix=[${DIRS}]" >> $GITHUB_OUTPUT | ||
id: set-matrix | ||
license-check: | ||
needs: [generate-matrix] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
strategy: | ||
matrix: | ||
dir: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | ||
|
@@ -50,12 +55,11 @@ jobs: | |
with: | ||
node-version: 18 | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn license-checker | ||
- name: Install license checker | ||
run: npm install -g license-checker | ||
|
||
- name: Install dependencies in ${{ matrix.dir }} | ||
working-directory: ${{ matrix.dir }} | ||
run: yarn install | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Check licenses in ${{ matrix.dir }} | ||
working-directory: ${{ matrix.dir }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters