Comments (10)
We have the Advanced Usage so you would need to pass the names of all the other workflows.
This accepts names or IDs as seen here:
That being said, we could add a new feature for workflow_id: all
or something like that to indicate you want this workflow to cancel all other workflows.
from cancel-workflow-action.
For the lazy, guess you're talking about this https://github.com/zulip/zulip/blob/143206795949d85545d1a76f634d23b5b780898f/.github/workflows/cancel-previous-runs.yml#L23-L36
- name: Get workflow IDs.
id: workflow_ids
env:
# This is in <owner>/<repo> format e.g. zulip/zulip
REPOSITORY: ${{ github.repository }}
run: |
workflow_api_url=https://api.github.com/repos/$REPOSITORY/actions/workflows
curl $workflow_api_url -o workflows.json
script="const {workflows} = require('./workflows'); \
const ids = workflows.map(workflow => workflow.id); \
console.log(ids.join(','));"
ids=$(node -e "$script")
echo "::set-output name=ids::$ids"
from cancel-workflow-action.
Feel free to create a PR and I'll take a look π
from cancel-workflow-action.
I am in favor of the all
feature as having 2 workflows for cancelling doesn't feel good.
from cancel-workflow-action.
@styfle Created a Pull request to close this issue, please review
from cancel-workflow-action.
You can use the workflow name instead of the ID as mentioned in the README:
from cancel-workflow-action.
I'm not sure I ever thought about this or if it's even possible, but a mode where it automatically cancels all workflows except it's would be great. That basically how I use it and once you've a lot of repos with lots of workflows, it gets easy to miss the one or other in a whileβ¦
from cancel-workflow-action.
Guys please head over to zulip/zulip to take a look. We are doing some good work :). We already did it, that's why thought of creating this issue over here as a heads up.
from cancel-workflow-action.
Are you sure it works? When I look in https://github.com/zulip/zulip/runs/1772509492?check_suite_focus=true , I see Resource not accessible by integration
error for pull_request
event.
Digging through the logs, it is like this as far back as 2020-12-10 (https://github.com/zulip/zulip/runs/1531990604?check_suite_focus=true).
I am not sure if GitHub changed the scope of github.token
or it has always been like this for pull_request
.
from cancel-workflow-action.
That being said, we could add a new feature for workflow_id: all or something like that to indicate you want this workflow to cancel all other workflows.
Should we create a separate feature request issue for this? Or will it be tracked here? I think it would be great to have this.
from cancel-workflow-action.
Related Issues (20)
- `Error: Not Found` when running action HOT 3
- Prints a lot details and makes action messier. HOT 4
- GitHub Action marketplace page not updated with latest version info HOT 1
- Cancel action makes our repo test badge "failing" HOT 4
- Fork-based setup seems to cancel itself and not the target workflows HOT 7
- Finding 0 runs HOT 5
- Actions now has built-in cancelation HOT 2
- Does this work on prs? HOT 1
- cancel workflow without email? HOT 2
- possible to cancel previous workflows only when a specific job has not been started? HOT 1
- how to make a cancelled workflow count as skip instead of failed? HOT 3
- Use Node.js v16 HOT 2
- Cancelling the current run HOT 2
- Archive this repo HOT 3
- error message using this step HOT 5
- It should cancel all instances of running workflow when workflow name in workflow_id is specified HOT 3
- Cancel Actions Got A Error HOT 1
- Flag to pick `in_progress`, `waiting` or both to be canceled HOT 2
- Use getBooleanInput to get ignore_sha and all_but_latest HOT 2
- Azure Pipelines alternative HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cancel-workflow-action.