From f04c791e79d52617f1fc15258dc52f7c6525c000 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Sat, 22 Feb 2025 16:28:48 +0100 Subject: [PATCH] chore: reduce number of executed jobs Signed-off-by: Matthieu MOREL --- .github/workflows/build_test.yml | 12 +++++++++++- .github/workflows/labeler.yml | 9 +++++---- .github/workflows/lint.yml | 6 ++++++ .github/workflows/release.yml | 5 +++-- .github/workflows/sbom_generator.yml | 6 ++---- .github/workflows/shellcheck.yml | 18 ++++++++++++++---- .github/workflows/test.yml | 12 +++++++++++- 7 files changed, 52 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 6fe7f05..815a47e 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -1,5 +1,15 @@ -on: [push, pull_request] name: Build Test + +on: + push: + branches: + - master + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 5626060..81fe734 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,6 +1,7 @@ name: "Pull Request Labeler" + on: -- pull_request_target + pull_request_target: permissions: contents: read @@ -12,6 +13,6 @@ jobs: pull-requests: write # for actions/labeler to add labels to PRs runs-on: ubuntu-latest steps: - - uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" + - uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5618fe2..886b118 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,8 +2,14 @@ name: Golangci-lint on: push: + branches: + - master pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28c22d7..6df6fbe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,9 @@ +name: Release + on: schedule: - - cron: '0 1 1 * *' # UTC 01:00 on the first day of the Month + - cron: '0 1 1 * *' # UTC 01:00 on the first day of the Month -name: Release permissions: contents: write diff --git a/.github/workflows/sbom_generator.yml b/.github/workflows/sbom_generator.yml index 3b33fe7..d411748 100644 --- a/.github/workflows/sbom_generator.yml +++ b/.github/workflows/sbom_generator.yml @@ -2,8 +2,8 @@ name: SBOM Generator on: push: - branches: [ "master" ] - + branches: + - master workflow_dispatch: permissions: read-all @@ -11,10 +11,8 @@ permissions: read-all jobs: build: runs-on: ubuntu-latest - steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: advanced-security/sbom-generator-action@6fe43abf522b2e7a19bc769aec1e6c848614b517 # v0.0.2 id: sbom env: diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index f6bca03..800e71b 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -1,5 +1,15 @@ -on: [push, pull_request] name: Shellcheck + +on: + push: + branches: + - master + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read @@ -8,6 +18,6 @@ jobs: name: Shellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Run ShellCheck - uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a174ec..3a0241f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,15 @@ -on: [push, pull_request] name: Test + +on: + push: + branches: + - master + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read