Skip to content

Commit

Permalink
[ci] Cancel fastcheck when PR is ready (vllm-project#7433)
Browse files Browse the repository at this point in the history
Signed-off-by: kevin <kevin@anyscale.com>
  • Loading branch information
khluu authored Aug 12, 2024
1 parent 9b3e2ed commit 1137f34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cancel_fastcheck_when_ready.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ on:

jobs:
cancel-buildkite-run:
if: github.event.label.name == 'invalid'
if: github.event.label.name == 'ready'
runs-on: ubuntu-latest
steps:
- name: Cancel Buildkite Run
- name: Cancel fastcheck run on Buildkite
env:
BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }}
BUILDKITE_ORG: vllm
BUILDKITE_PIPELINE: fastcheck
run: |
echo "PR branch"
FULL_BRANCH=${{ github.event.pull_request.head.repo.owner.login }}:${{ github.event.pull_request.head.ref }}
echo "PR branch: $FULL_BRANCH"
LATEST_BUILD_NUMBER=$(curl -H "Authorization: Bearer $BUILDKITE_TOKEN" \
"https://api.buildkite.com/v2/organizations/$BUILDKITE_ORG/pipelines/$BUILDKITE_PIPELINE/builds?branch=$FULL_BRANCH&state[]=scheduled&state[]=running" \
| jq -r '.[0].number')
Expand Down

0 comments on commit 1137f34

Please sign in to comment.