Skip to content

Commit

Permalink
making github action jobs sequential
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalerhino committed Oct 19, 2024
1 parent 0fcf37f commit 5f0be33
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,30 @@ on:
pull_request:

jobs:
codeql:
name: Run CodeQL SAST
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript

- name: Autobuild
uses: github/codeql-action/autobuild@v2

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

build:
name: Build Docker Image
runs-on: ubuntu-latest

needs: codeql
steps:
- name: Checkout Code
uses: actions/checkout@v3
Expand All @@ -32,6 +52,7 @@ jobs:
trivy:
name: Run Trivy Scan
runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout Code
Expand All @@ -47,29 +68,10 @@ jobs:
run: |
trivy image ${{ secrets.DOCKER_USERNAME }}/container-security-lab:latest
codeql:
name: Run CodeQL SAST
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript

- name: Autobuild
uses: github/codeql-action/autobuild@v2

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

sign:
name: Sign Docker Image with Cosign
runs-on: ubuntu-latest
needs: trivy

steps:
- name: Checkout Code
Expand All @@ -90,6 +92,7 @@ jobs:
validate-signature:
name: Validate Docker Image Signature
runs-on: ubuntu-latest
needs: sign

steps:
- name: Checkout Code
Expand Down

0 comments on commit 5f0be33

Please sign in to comment.