Skip to content

feat: add solhint

feat: add solhint #23

Workflow file for this run

name: Sync community analyzers
on:
push:
tags:
- v*
env:
SYNC_ENDPOINT: ${{ secrets.SYNC_ENDPOINT_DEV }}
DATASYNC_SECRET: ${{ secrets.DATASYNC_SECRET_DEV }}
jobs:
sync_analyzers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Tailscale
uses: tailscale/github-action@v1
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
- name: Send sync signal
run: |
# Prepare a list of names of all analyzers to sync
# These are all the subdirectories under `analyzers/` of the current repository
# We only want the names of subdir stored as strings in the array
# Expected result: ["infer", "kube-linter"]
analyzer_shortcodes=$(echo -n analyzers/* | sed 's:analyzers/::g; s:/$::' | jq -cRs 'split(" ")')
# Send a sync signal
curl -X POST $SYNC_ENDPOINT -H "Content-Type: application/json" -H "Authorization: Bearer ${DATASYNC_SECRET}" --data-raw '{"query":" mutation($input: TriggerCommunityAnalyzersSyncInput!){\n triggerCommunityAnalyzersSync(input: $input){\n ok\n }\n}","variables":{"input":{"repoRef":'\""$GITHUB_REF_NAME"\"', "analyzerTools":'"$analyzer_shortcodes"'}}}'
# Print a confirmation message
if [ $? -eq 0 ]; then
echo "Sync signal sent for $analyzer_shortcodes."
else
echo "Sync signal failed for $analyzer_shortcodes."
# Exit with a non-zero code to fail this GitHub Action pipeline
exit 1
fi