Skip to content

Commit 742cdfa

Browse files
filter to cdylib crates and expand permissions comment
1 parent aba30ca commit 742cdfa

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/test-with-openzeppelin-stellar-contracts.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}-{{ github.event_name }}
1010
cancel-in-progress: true
1111

12-
permissions: {} # No permissions
12+
# No permissions. This workflow downloads code from outside this repository and
13+
# compiles it. No permissions ensures that any exploit in an external
14+
# repository does not gain access to anything in this repo.
15+
permissions: {}
1316

1417
jobs:
1518
collect-contracts:
@@ -21,7 +24,8 @@ jobs:
2124
ref: main
2225
- id: dirs
2326
run: |
24-
dirs=$(find . -name 'Cargo.toml' -mindepth 2 | xargs dirname | sed 's|^\./||' | jq -Rnc '[inputs | "\(.)"]')
27+
# Find Cargo.toml files that build to crate-type cdylib.
28+
dirs=$(find . -name 'Cargo.toml' -mindepth 2 | xargs -I {} sh -c 'if grep -q "cdylib" "{}"; then dirname "{}"; fi' | sed 's|^\./||' | jq -Rnc '[inputs | "\(.)"]')
2529
echo "dirs=$dirs" >> $GITHUB_OUTPUT
2630
outputs:
2731
dirs: ${{ steps.dirs.outputs.dirs }}

0 commit comments

Comments
 (0)