Skip to content

chore: changelog for 11.35.0 (#3025) πŸ’ #1780

chore: changelog for 11.35.0 (#3025) πŸ’

chore: changelog for 11.35.0 (#3025) πŸ’ #1780

Workflow file for this run

name: E2E Cancel
on:
pull_request:
types:
- labeled
jobs:
cancel:
if: ${{ github.event.label.name == 'skip e2e' }}
runs-on: ubuntu-latest
steps:
# Avoid race conditions where the e2e job and this job both kick off at the same time.
- name: Pause
run: sleep 10
- name: Cancel
uses: actions/github-script@v7
with:
script: |
const { data: runs } = await github.request('GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs', {
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'e2e.yml',
head_sha: context.payload.pull_request.head.sha,
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
});
if (runs[0] && ['in_progress', 'pending', 'queued', 'requested', 'waiting'].includes(runs[0].status)) {
core.info(`Cancelling run ${runs[0].id}`);
await github.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel', {
owner: context.repo.owner,
repo: context.repo.repo,
run_id: runs[0].id,
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
});
} else {
core.info('Nothing found to cancel');
}