Skip to content

Commit

Permalink
codeql-analysis.yml: skip duplicate actions
Browse files Browse the repository at this point in the history
Apply the same change that was done for maven_push.yml to codeql-analysis.yml to skip unnecessary actions.
  • Loading branch information
henrymai authored Mar 13, 2023
1 parent a2517a0 commit 60bd540
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,30 @@ on:
- cron: '0 12 * * 6'

jobs:
CodeQL-Build:
# This is from: https://github.com/fkirc/skip-duplicate-actions#example-1-skip-entire-jobs
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/[email protected]
with:
cancel_others: 'true'
concurrent_skipping: 'same_content_newer'

CodeQL-Build:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
permissions:
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

0 comments on commit 60bd540

Please sign in to comment.