Skip to content

ci(codeql): fetch all changes #36

ci(codeql): fetch all changes

ci(codeql): fetch all changes #36

Workflow file for this run

name: CodeQL
on:
push:
branches: [main]
jobs:
analyze:
runs-on: ubuntu-latest
permissions:
security-events: write
actions: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check for non-Dependabot commits
run: |
git fetch origin "${{ github.event.before }}..${{ github.sha }}"
if git log --format='%an' ${{ github.event.before }}..${{ github.sha }} | grep "dependabot\[bot\]" &> /dev/null; then
echo "Non-Dependabot commits found. Workflow can continue."
exit 0
fi
echo "Only Dependabot commits found."
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
- name: Perform analysis
uses: github/codeql-action/analyze@v2