ci(secu): replace gitleaks secret and remove PRT (#5552)

This commit is contained in:
Stéphane Chapron 2025-04-17 16:05:55 +02:00 committed by GitHub
parent f0844bec5f
commit 24702e95de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 6 deletions

View File

@ -104,7 +104,7 @@ jobs:
get-environment: get-environment:
if: | if: |
contains(fromJSON('["pull_request", "pull_request_target"]') , github.event_name) && contains(fromJSON('["pull_request"]') , github.event_name) &&
(startsWith(github.base_ref, 'release-') || startsWith(github.base_ref, 'hotfix-')) (startsWith(github.base_ref, 'release-') || startsWith(github.base_ref, 'hotfix-'))
uses: ./.github/workflows/get-environment.yml uses: ./.github/workflows/get-environment.yml
@ -112,7 +112,7 @@ jobs:
needs: [get-environment, check-status] needs: [get-environment, check-status]
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
if: | if: |
contains(fromJSON('["pull_request", "pull_request_target"]') , github.event_name) && contains(fromJSON('["pull_request"]') , github.event_name) &&
needs.get-environment.outputs.target_stability == 'testing' && needs.get-environment.outputs.target_stability == 'testing' &&
! contains(needs.get-environment.outputs.labels, 'skip-cherry-pick') ! contains(needs.get-environment.outputs.labels, 'skip-cherry-pick')

View File

@ -52,7 +52,7 @@ jobs:
let hasSkipLabel = false; let hasSkipLabel = false;
let labels = []; let labels = [];
if (${{ contains(fromJSON('["pull_request", "pull_request_target"]') , github.event_name) }} === true) { if (${{ contains(fromJSON('["pull_request"]') , github.event_name) }} === true) {
try { try {
const fetchedLabels = await github.rest.issues.listLabelsOnIssue({ const fetchedLabels = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner, owner: context.repo.owner,

View File

@ -15,7 +15,7 @@ jobs:
- uses: gitleaks/gitleaks-action@83373cf2f8c4db6e24b41c1a9b086bb9619e9cd3 # v2.3.7 - uses: gitleaks/gitleaks-action@83373cf2f8c4db6e24b41c1a9b086bb9619e9cd3 # v2.3.7
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}} GITLEAKS_LICENSE: "Centreon"
GITLEAKS_ENABLE_COMMENTS: false GITLEAKS_ENABLE_COMMENTS: false
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false
GITLEAKS_ENABLE_SUMMARY: false GITLEAKS_ENABLE_SUMMARY: false

View File

@ -5,7 +5,7 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
on: on:
pull_request_target: pull_request:
jobs: jobs:
set-pull-request-external-label: set-pull-request-external-label:

View File

@ -5,7 +5,7 @@ on:
jobs: jobs:
set-pull-request-skip-label: set-pull-request-skip-label:
if: ${{ success() && contains(fromJSON('["pull_request", "pull_request_target"]') , github.event_name) }} if: ${{ success() && contains(fromJSON('["pull_request"]') , github.event_name) }}
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps: