Skip to content

Commit

Permalink
Merge branch 'NVIDIA:main' into vneva-eval
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanzic authored Apr 17, 2024
2 parents 22004c7 + 0351363 commit 2508c5d
Show file tree
Hide file tree
Showing 322 changed files with 35,969 additions and 4,158 deletions.
25 changes: 25 additions & 0 deletions .github/actions/cancel-workflow/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Cancel Workflow
description: >
Cancels the current workflow run, i.e. all jobs. Useful if you want to cancel the rest of the workflow when one job
fails. Note that this will cause the workflow to appear cancelled, not failed.
# Cancelling the workflow in a post-script (like this:
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runspost; can also be done with
# this action: https://github.com/webiny/action-post-run, see Git history of this file) wouldn't help the status, it
# would still be cancelled. It actually indeed is, but it would be nicer to set it to failed, but there seems to be no
# way to do this.

runs:
using: "composite"
steps:
- name: Cancel Workflow
# # Fork PRs won't have a token with write access to Actions, thus won't be able to cancel the workflow.
# if: github.event.pull_request == '' || github.event.pull_request.head.repo.fork == false
shell: bash
run: |
curl --verbose \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel
Loading

0 comments on commit 2508c5d

Please sign in to comment.