-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
833bbe3
commit f39b72c
Showing
1 changed file
with
22 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Slither Analysis | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
analyze: | ||
runs-on: ubuntu-latest | ||
|
@@ -14,14 +15,26 @@ jobs: | |
with: | ||
node-version: 16 | ||
fail-on: none | ||
slither-args: --checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/ | ||
slither-args: --checklist --show-ignored-findings --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/ | ||
|
||
- name: Save Slither output to file | ||
run: echo "${{ steps.slither.outputs.stdout }}" > slither-output.txt | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "[email protected]" | ||
- name: Commit and push changes | ||
run: | | ||
git add slither-output.txt | ||
git commit -m "Update Slither analysis output" | ||
git push | ||
- name: Create/update checklist as PR comment | ||
uses: actions/github-script@v6 | ||
if: github.event_name == 'pull_request' | ||
# Upload Slither Report as an Artifact | ||
- name: Upload Slither Report | ||
if: always() # Ensure the artifact is uploaded even if previous steps fail | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
script: | | ||
const script = require('.github/scripts/comment') | ||
const header = '# Slither report' | ||
const body = `${{ steps.slither.outputs.stdout }}` | ||
await script({ github, context, header, body }) | ||
name: slither-report | ||
path: slither-output.txt |