File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,15 @@ jobs:
48
48
(echo '```toml'; sed -e '1,/```toml/d' README.md) > EXAMPLE_README.md
49
49
while read FILE ; do
50
50
echo -n "$FILE: "
51
- docker run --rm -v ${{ github.workspace }}: /repo haskell/hsec-tools:latest /bin/hsec-tools check "repo/ $FILE" || RESULT=1
51
+ docker run --rm -v $PWD:/repo --workdir /repo haskell/hsec-tools:latest /bin/hsec-tools check "$FILE" || RESULT=1
52
52
done < <([ ${#CHANGED_ADVISORIES[@]} -gt 0 ] && printf "%s\n" "${CHANGED_ADVISORIES[@]}" || find advisories EXAMPLE_README.md EXAMPLE_ADVISORY.md -type f -name "*.md")
53
53
exit $RESULT
54
54
- name : Run advisory uniqueness checks
55
55
run : |
56
56
! find source/advisories -type f -name '*.md' -print0 \
57
57
| xargs -0n1 basename | sort | uniq -c | grep -E -v '[[:space:]]*1 '
58
58
- name : Publish OSV data
59
- if : ${{ github.event_name == 'push' }}
59
+ if : ${{ github.event_name == 'push' && github.ref_name == 'main' && github.repository == 'haskell/security-advisories' }}
60
60
env :
61
61
GITHUB_SHA : ${{ github.sha }}
62
62
run : |
67
67
ID=$(basename "$FILE" .md)
68
68
YEAR=$(echo "$ID" | cut -d - -f 2)
69
69
mkdir -p $DATA_DIR/$YEAR
70
- docker run --rm -v ${{ github.workspace }} :/repo --workdir /repo haskell/hsec-tools:latest /bin/hsec-tools osv "$FILE" > $DATA_DIR/$YEAR/$ID.json
70
+ docker run --rm -v $PWD :/repo --workdir /repo haskell/hsec-tools:latest /bin/hsec-tools osv "$FILE" > $DATA_DIR/$YEAR/$ID.json
71
71
done < <(find advisories -type f -name "*.md")
72
72
BRANCH=generated/osv-export
73
73
REF=refs/remotes/origin/$BRANCH
You can’t perform that action at this time.
0 commit comments