Skip to content

Commit

Permalink
add concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanagustin committed Sep 26, 2024
1 parent 9591ad9 commit 549a267
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/anchore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ permissions:
security-events: write
actions: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Anchore-Build-Scan:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ permissions:
security-events: write
actions: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
codacy-security-scan:
name: Codacy Security Scan
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ permissions:
actions: read
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze (${{ matrix.language }})
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/grype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ permissions:
security-events: write
actions: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Anchore-Build-Scan:
runs-on: ubuntu-latest
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ name: trivy

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: '29 1 * * 4'
- cron: "29 1 * * 4"

permissions:
contents: read
security-events: write
actions: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: Build
runs-on: "ubuntu-20.04"
steps:
Expand All @@ -36,13 +37,13 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@7b7aa264d83dc58691451798b4d117d53d21edfe
with:
image-ref: 'ghcr.io/drengskapur/pptx2video:${{ github.sha }}'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
image-ref: "ghcr.io/drengskapur/pptx2video:${{ github.sha }}"
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH"

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
sarif_file: "trivy-results.sarif"

0 comments on commit 549a267

Please sign in to comment.