Skip to content

Commit

Permalink
ci: Update github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Schubert Anselme <[email protected]>
  • Loading branch information
sanselme committed Oct 9, 2024
1 parent f7a6610 commit e7b8c68
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 303 deletions.
58 changes: 0 additions & 58 deletions .github/build/img/Dockerfile

This file was deleted.

27 changes: 20 additions & 7 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,30 @@ jobs:
issues: write
pull-requests: write
repository-projects: write

sonarqube:
uses: ./.github/workflows/sonarqube.yml
trivy:
uses: ./.github/workflows/trivy.yml
# devos:
# uses: ./.github/workflows/devos.yml

trivy:
uses: ./.github/workflows/trivy.yml
permissions:
contents: write
id-token: write
security-events: write
scorecard:
uses: ./.github/workflows/scorecard.yml
permissions:
contents: write
actions: read
attestations: read
checks: read
contents: read
deployments: read
discussions: read
id-token: write
issues: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: write
statuses: read
# sonarqube:
# uses: ./.github/workflows/sonarqube.yml
14 changes: 0 additions & 14 deletions .github/workflows/gate/devos.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/gate/sonarqube.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/gate/trivy.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/ondemand/bot.yml

This file was deleted.

68 changes: 0 additions & 68 deletions .github/workflows/ondemand/cleanup.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/ondemand/scorecard.yml

This file was deleted.

17 changes: 9 additions & 8 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ on:
type: boolean
description: Whether to publish results to OpenSSF REST API

permissions:
contents: write
id-token: write
security-events: write
permissions: read-all

jobs:
analysis:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
permissions:
id-token: write
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 https://github.com/actions/checkout/commit/692973e3d937129bcbf40652eb9f2f61becf3332
Expand All @@ -38,7 +38,8 @@ jobs:
with:
path: results.sarif

- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@b8efe4dc6ab6d31abe3ec159420d2a4916880800 # v3.26.6 https://github.com/github/codeql-action/commit/b8efe4dc6ab6d31abe3ec159420d2a4916880800
with:
sarif_file: results.sarif
# fixme: No SARIF files found to upload in "results.sarif".
# - name: Upload to code-scanning
# uses: github/codeql-action/upload-sarif@b8efe4dc6ab6d31abe3ec159420d2a4916880800 # v3.26.6 https://github.com/github/codeql-action/commit/b8efe4dc6ab6d31abe3ec159420d2a4916880800
# with:
# sarif_file: results.sarif
10 changes: 2 additions & 8 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
name: SonarQube

on:
workflow_call:
inputs:
sonarqube:
type: boolean
default: false
description: Run SonarQube Quality Gate
- workflow_call

permissions: read-all

jobs:
sonarqube:
runs-on: ubuntu-latest
if: ${{ inputs.sonarqube }}
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 https://github.com/actions/checkout/commit/692973e3d937129bcbf40652eb9f2f61becf3332
Expand All @@ -24,5 +18,5 @@ jobs:
uses: sonarsource/sonarqube-quality-gate-action@d304d050d930b02a896b0f85935344f023928496 # v1.1.0 https://github.com/SonarSource/sonarqube-quality-gate-action/commit/d304d050d930b02a896b0f85935344f023928496
timeout-minutes: 5
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5 changes: 4 additions & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ name: Trivy
on:
- workflow_call

permissions: read-all
permissions:
contents: write
id-token: write
security-events: write

jobs:
trivy:
Expand Down

0 comments on commit e7b8c68

Please sign in to comment.