diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index f7d27fc38c..2aba2d2397 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -9,6 +9,10 @@ on: paths-ignore: ["docs/**", "**.md"] types: [opened, reopened, synchronize, labeled] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: macro_benchmark: name: Macro Benchmarks diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d75c15cd15..ae721ff9d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,13 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + # TODO: cancel in progress is not ok for a release since it can be cancelled in a middle of updates + # and we can end up with partial release. + # but for pull-requests cancelling previously running jobs could be beneficial + # cancel-in-progress: true + jobs: check_if_build: name: Check if Build diff --git a/.github/workflows/comment-commit.yml b/.github/workflows/comment-commit.yml index f6b68459d2..d8a9ccbd90 100644 --- a/.github/workflows/comment-commit.yml +++ b/.github/workflows/comment-commit.yml @@ -11,7 +11,6 @@ jobs: name: Comment on commit runs-on: ubuntu-latest if: > - github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' steps: - name: Download artifact with body message diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cf87b00d88..1a373ca011 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,6 +10,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint: name: Run Formatter and Lint Check @@ -26,14 +30,12 @@ jobs: node-version: "20.11.0" - name: Install Prettier run: npm install --global prettier + - uses: actions/checkout@v4 - name: Install Nightly Toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: nightly components: rustfmt, clippy - - uses: actions/checkout@v4 - with: - ref: ${{ (env.LINT_MODE == 'fix' && github.event.pull_request.head.sha) || '' }} - name: Run Lint Script run: ./lint.sh --mode=$LINT_MODE - name: Commit and push if changed diff --git a/.github/workflows/pr-convention.yml b/.github/workflows/pr-convention.yml index 6591e099c6..e4b92cfb88 100644 --- a/.github/workflows/pr-convention.yml +++ b/.github/workflows/pr-convention.yml @@ -4,7 +4,7 @@ on: # pull_request_target is ok until we do not checkout and build external code # TODO: maybe it is not required after all https://github.com/amannn/action-semantic-pull-request/issues/219 pull_request_target: - types: [opened, edited] + types: [opened, reopened, synchronize, edited] permissions: pull-requests: read