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

Disable pull_request trigger for ci:test:deploy #1112

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
17 changes: 16 additions & 1 deletion .github/workflows/ci:test:deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
push:
branches:
- main
pull_request:
merge_group:
workflow_run:
workflows:
Expand Down Expand Up @@ -33,6 +32,22 @@
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Cancel job if triggering workflow was cancelled
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'cancelled'
uses: actions/github-script@v7

Check failure on line 37 in .github/workflows/ci:test:deploy.yml

View workflow job for this annotation

GitHub Actions / Continuous integration (lint workflows)

missing input "script" which is required by action "actions/github-script@v7". all required inputs are "script"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |

Check failure on line 40 in .github/workflows/ci:test:deploy.yml

View workflow job for this annotation

GitHub Actions / Continuous integration (lint workflows)

this step is for running action since it contains at least one of "uses", "with" keys, but also contains "run" key which is used for running shell command
echo "Cancelling because ci:build:image was cancelled"
echo "${GITHUB_TOKEN}" | gh auth login --with-token
gh run cancel "${GITHUB_RUN_ID}"

echo "Waiting for cancellation..."
sleep 10

echo "Workflow cancellation timeout."
exit 1

- name: Fail job if triggering workflow did not succeed
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion != 'success'
uses: actions/github-script@v7
Expand Down
Loading