Skip to content

Commit

Permalink
[.github] Update: use Github 'concurrency' definition instead of work…
Browse files Browse the repository at this point in the history
…flow-run-cleanup-action
  • Loading branch information
EskoDijk committed Sep 24, 2024
1 parent b4023fc commit e5f0f74
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 43 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,11 @@ on:
branches:
- 'main'

jobs:
cancel-previous-runs:
runs-on: ubuntu-22.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build (Go ${{ matrix.go }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,13 @@ on:
branches:
- 'develop'

jobs:
cancel-previous-runs:
runs-on: ubuntu-22.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
develop:
name: Develop (Go${{ matrix.go }},${{ matrix.os }})
name: Develop (Go${{ matrix.go }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
env:
HOMEBREW_NO_AUTO_UPDATE: 1
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,11 @@ on:
branches:
- 'docker'

jobs:
cancel-previous-runs:
runs-on: ubuntu-22.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
buildx:
name: buildx-${{ matrix.version }}
runs-on: ubuntu-22.04
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020-2023, The OTNS Authors.
# Copyright (c) 2020-2024, The OTNS Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -32,17 +32,13 @@ on:
branches:
- 'main'

jobs:
cancel-previous-runs:
runs-on: ubuntu-22.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
go-lint:
name: Go Lint
name: Go/Shell Lint
runs-on: ubuntu-22.04
env:
HOMEBREW_NO_AUTO_UPDATE: 1
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,11 @@ on:
branches:
- 'main'

jobs:
cancel-previous-runs:
runs-on: ubuntu-22.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
stress-tests:
name: "Test Suite ${{ matrix.suite }}"
strategy:
Expand Down

0 comments on commit e5f0f74

Please sign in to comment.