-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github-actions: use concurrency: true if PRs
- Loading branch information
Showing
5 changed files
with
17 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,10 @@ on: | |
schedule: | ||
- cron: '0 11 * * 6' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
|
@@ -17,16 +21,9 @@ jobs: | |
permissions: | ||
# required for all workflows | ||
security-events: write | ||
# only required for workflows in private repositories | ||
actions: write | ||
contents: read | ||
|
||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,20 +8,17 @@ on: | |
required: true | ||
|
||
permissions: | ||
# Required to stop running workflows | ||
actions: write | ||
packages: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
build-docker-images: | ||
name: Build Docker Images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,21 +21,16 @@ on: | |
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: | ||
# Required to stop running workflows | ||
actions: write | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
# Check if there any dirty change for go mod tidy | ||
go-mod: | ||
name: "Check go modules declaration" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Install Go | ||
uses: actions/setup-go@v3 | ||
|
@@ -63,11 +58,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: [golangci-lint, go-mod] | ||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -98,11 +88,6 @@ jobs: | |
name: "GolangCI-lint" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Install Go | ||
uses: actions/setup-go@v3 | ||
|
@@ -122,11 +107,6 @@ jobs: | |
needs: [go-mod, compile-dryrun, golangci-lint] # run after golangci-lint action to not produce duplicated errors | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -160,11 +140,6 @@ jobs: | |
needs: [go-mod, compile-dryrun, golangci-lint] # run after golangci-lint action to not produce duplicated errors | ||
runs-on: windows-latest | ||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -198,11 +173,6 @@ jobs: | |
needs: [go-mod, compile-dryrun, golangci-lint] # run after golangci-lint action to not produce duplicated errors | ||
runs-on: macos-latest | ||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,9 @@ on: | |
description: 'Release version' | ||
required: true | ||
|
||
permissions: | ||
# Required to stop running workflows | ||
actions: write | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
release: | ||
|
@@ -18,11 +18,6 @@ jobs: | |
packages: read | ||
contents: write | ||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,21 +9,16 @@ on: | |
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: | ||
# Required to stop running workflows | ||
actions: write | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
vulns: | ||
name: Nancy scanner | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
uses: actions/checkout@v3 | ||
- | ||
|
@@ -47,11 +42,6 @@ jobs: | |
pull-requests: read | ||
|
||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
uses: actions/checkout@v3 | ||
- | ||
|
@@ -79,15 +69,9 @@ jobs: | |
# contents: read | ||
# security-events: write | ||
# pull-requests: read | ||
# actions: write | ||
# | ||
# steps: | ||
# - | ||
# name: Cancel previous workflows | ||
# uses: styfle/[email protected] | ||
# with: | ||
# access_token: ${{ secrets.GITHUB_TOKEN }} | ||
# - | ||
# uses: actions/checkout@v3 | ||
# - | ||
# name: Run Snyk to check for vulnerabilities | ||
|
@@ -114,11 +98,6 @@ jobs: | |
pull-requests: read | ||
|
||
steps: | ||
- | ||
name: Cancel previous workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
uses: actions/checkout@v3 | ||
- | ||
|