Unverified Commit 1137f343 authored by Kevin H. Luu's avatar Kevin H. Luu Committed by GitHub
Browse files

[ci] Cancel fastcheck when PR is ready (#7433)


Signed-off-by: default avatarkevin <kevin@anyscale.com>
parent 9b3e2edd
...@@ -6,17 +6,17 @@ on: ...@@ -6,17 +6,17 @@ on:
jobs: jobs:
cancel-buildkite-run: cancel-buildkite-run:
if: github.event.label.name == 'invalid' if: github.event.label.name == 'ready'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Cancel Buildkite Run - name: Cancel fastcheck run on Buildkite
env: env:
BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }} BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }}
BUILDKITE_ORG: vllm BUILDKITE_ORG: vllm
BUILDKITE_PIPELINE: fastcheck BUILDKITE_PIPELINE: fastcheck
run: | run: |
echo "PR branch"
FULL_BRANCH=${{ github.event.pull_request.head.repo.owner.login }}:${{ github.event.pull_request.head.ref }} 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" \ 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" \ "https://api.buildkite.com/v2/organizations/$BUILDKITE_ORG/pipelines/$BUILDKITE_PIPELINE/builds?branch=$FULL_BRANCH&state[]=scheduled&state[]=running" \
| jq -r '.[0].number') | jq -r '.[0].number')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment