Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflow cancel handling #50442

Merged
merged 3 commits into from
May 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ name: build-and-test
on:
push:
branches: ['canary']
pull_request_target:
pull_request:
types: [opened, synchronize]

concurrency:
group: ${{ github.ref }}-build-and-test
cancel-in-progress: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ijjk How about something like this:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/canary' }}

I'm curious what problem you were seeing with the native cancel?


env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.9.6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
steps:
- uses: styfle/[email protected]
with:
workflow_id: 444921, 444987
workflow_id: 444921, 444987, 57419851
access_token: ${{ github.token }}
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_stats.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
pull_request_target:
pull_request:
types: [opened, synchronize]

name: Generate Pull Request Stats
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-for-change.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function main() {
// if we are on the canary branch only diff current commit
const toDiff = isCanary
? `${process.env.GITHUB_SHA || 'canary'}~`
: 'origin/canary HEAD'
: 'origin/canary...'

const changesResult = await exec(`git diff ${toDiff} --name-only`).catch(
(err) => {
Expand Down