Holesky Deployment and Github Actions #1
Workflow file for this run
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
name: Slither Static Analysis | |
# Runs only on PR merging to main | |
on: | |
pull_request: | |
branches: [ main ] | |
types: [ opened, reopened, synchronize, ready_for_review ] | |
workflow_dispatch: | |
jobs: | |
analyze: | |
runs-on: ubuntu-latest | |
# Do not run when PR is still a draft | |
if: ${{ !github.event.pull_request.draft }} | |
env: | |
commit_url: ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.event.pull_request.head.sha }}/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run Slither | |
uses: crytic/[email protected] | |
id: slither | |
with: | |
fail-on: none | |
slither-args: --checklist --show-ignored-findings --markdown-root ${{ env.commit_url }} | |
- name: Create/update checklist as PR comment | |
uses: actions/github-script@v7 | |
env: | |
REPORT: ${{ steps.slither.outputs.stdout }} | |
with: | |
script: | | |
const script = require('.github/scripts/slither-comment') | |
const header = '# Slither report' | |
const body = process.env.REPORT | |
await script({ github, context, header, body }) |