Use concurrency group for CD to limit wasteful runs

Signed-off-by: Brett Logan <lindluni@github.com>
This commit is contained in:
Brett Logan 2023-01-03 19:40:56 -05:00
parent b7edcbf91b
commit bc174e3f5c
2 changed files with 6 additions and 3 deletions

View file

@ -9,6 +9,9 @@ jobs:
test: test:
name: Build and Test name: Build and Test
runs-on: ubuntu-20.04-8core-sl runs-on: ubuntu-20.04-8core-sl
concurrency:
group: ${{ github.workflow }}-main
cancel-in-progress: false
permissions: permissions:
contents: read contents: read
deployments: write deployments: write
@ -71,6 +74,7 @@ jobs:
- name: Update ${{ matrix.images.environment }} Deployment - name: Update ${{ matrix.images.environment }} Deployment
uses: bobheadxi/deployments@v1.3.0 uses: bobheadxi/deployments@v1.3.0
if: always()
with: with:
step: finish step: finish
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
@ -80,8 +84,8 @@ jobs:
env_url: https://github.com/github/super-linter env_url: https://github.com/github/super-linter
- name: Create Issue on Failure - name: Create Issue on Failure
if: failure()
uses: actions/github-script@v6 uses: actions/github-script@v6
if: failure()
with: with:
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |

View file

@ -56,8 +56,7 @@ jobs:
run: make IMAGE=${{ matrix.images.target }} test run: make IMAGE=${{ matrix.images.target }} test
- name: Upload Code Coverage Report - name: Upload Code Coverage Report
uses: codacy/codacy-coverage-reporter-action@v1.1 uses: codacy/codacy-coverage-reporter-action@v1
# Sometimes this fails when user does not have permissions to secrets
continue-on-error: true continue-on-error: true
with: with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}