Parallel Steps #14484
Replies: 29 comments · 48 replies
-
I'd like that too. There are scenarios where it doesn't make sense juggling artifacts between jobs. An idea how it could be used: steps:
- uses: actions/checkout@v3
- run: echo "Sequential step"
- parallel:
branch_id_1:
steps:
- run: echo "branch 1 sequential step 1"
- run: echo "branch 1 sequential step 2"
# Executes steps in parallel to branch1
branch_id_2:
steps:
- run: echo "branch 2 sequential step 1"
- run: echo "branch 2 sequential step 2"
- run: echo "More sequential steps after the whole parallel part is done." |
Beta Was this translation helpful? Give feedback.
-
Alternative solution: |
Beta Was this translation helpful? Give feedback.
-
Alternative solution: |
Beta Was this translation helpful? Give feedback.
-
Logging into docker in parallel is probably going to result in things exploding. Each docker login command tries to mutate Today, you could probably do something like: (To make these work, you'd want to have them rely on env vars and set the env vars using your workflow based on secrets)
HOME=$HOME/.docker-docker
mkdir -p $HOME
docker login ...
HOME=$HOME/.docker-gcr
mkdir -p $HOME
docker login ...
HOME=$HOME/.docker-ghcr
mkdir -p $HOME
docker login ...
for task in ./log-into-*.sh; do
$task &
done
wait
jq '. * input' ~/.docker*/config.js > my.config.js && mv my.config.js ~/.docker/config.js
jq '. * input' ~/.docker*/plaintext-credentials.config.json > my.plaintext.js && mv my.plaintext.js ~/.docker/plaintext-credentials.config.json |
Beta Was this translation helpful? Give feedback.
-
can we have the parallel steps please |
Beta Was this translation helpful? Give feedback.
-
The BitBucket has parallel step options. Why not add this option to GitHub actions? |
Beta Was this translation helpful? Give feedback.
-
This is the biggest pain point we've run into coming from Jenkins. You can approximate this feature with |
Beta Was this translation helpful? Give feedback.
-
Need parallel steps support for our scenario: deploy multi clusters concurrently within the same VPN environment. So it is convinient to achive in steps rather than actions or jobs |
Beta Was this translation helpful? Give feedback.
-
Using a yarn monorepo I'd like to:
yarn install is slow, and I currently have to repeat it for every workflow like |
Beta Was this translation helpful? Give feedback.
-
If its easier, GitHub could also allow sharing jobs workdirs |
Beta Was this translation helpful? Give feedback.
-
I just want to start a resource in a background, which needs some time to start, eg a docker container or a simulator. This resource should start during the job start. My test step should wait until the test resource is available, or fail after an (optional) timeout. - jobs:
- build
- resources:
- test-db
run: docker start someSlowImage
- steps:
- run: assemble
- run: test
resources:
- test-db
timeout: 5min |
Beta Was this translation helpful? Give feedback.
-
Just add
|
Beta Was this translation helpful? Give feedback.
-
As a workaround I was able to use this ` name: Distributed Tasks
This way I was able to run our tests parallel |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hi. Are there any updates on this topic from a Github team member ? |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Would be great to have some updates here. Parallel steps would be great, plenty of instances where for example I'd like to know whether multiple steps fail (eg: a lint check as well as unit tests). While jobs can run in parallel, each needs to be setup again. Would be great for a pipeline to be able to run a setup step that for example pulls dependencies and then splits off in parallel steps each starting from the state left by the setup. |
Beta Was this translation helpful? Give feedback.
-
Would be awesome if we can, for example, compile our js/css files at the same time we are running composer (for PHP projects). |
Beta Was this translation helpful? Give feedback.
-
Just wanted to add, that parallel jobs means waiting for multiple available workers, which can add a lot to the total build time, and in some cases you don't need the extra hardware. Not sure what's the problem with implementing this. It just adds an option that aparently a lot of people find useful. |
Beta Was this translation helpful? Give feedback.
-
Bitbucket can do it, just saying... |
Beta Was this translation helpful? Give feedback.
-
the current way of running steps in parallel (i.e using bash |
Beta Was this translation helpful? Give feedback.
-
Don't know much about Actions as I'm new to this (trying to find alternatives to Drone CI), but a simple feature like this took so long time to implement, maybe the design of Actions has some fundamental flaws on create DAG of steps. Drone steps are by default parallel, unless you add a 'depends_on' list to steps, which would transform them to a DAG. |
Beta Was this translation helpful? Give feedback.
-
Would love this feature as well. We already have quite long running pipelines and saving some time would be great. We build our .NET backend then pack it as docker image. While creating the image takes significant time we also need to upload our symbols to Sentry for better error analysis. While docker images are being created we could parallelize the upload to Sentry. A new job is no option as we lose the symbol files we require. Right now we run a separate job which fetches git, compiles, etc. all just to upload already built symbols. Please implement this! :) |
Beta Was this translation helpful? Give feedback.
-
I have 5 small steps (10-30sec), each runs a docker container with different arguments. Ideally I would have first step to build docker image and then run those five steps in parallel. Doing this with workflows seems cumbersome and would possibly prolong the total run time with artifact upload and artifact downloads added to share the image between jobs. |
Beta Was this translation helpful? Give feedback.
-
Hey y'all! We are still gathering all the high engagement feedback items and triaging them for our work this year. Sorry I haven't commented on this one already. Thank you for all engaging and staying engaged for such a long period of time - please keep voting up on the top request and sharing your feedback with us |
Beta Was this translation helpful? Give feedback.
-
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
I just released https://github.com/qoomon/actions--parallel-steps This action supports basically all types of steps. |
Beta Was this translation helpful? Give feedback.
-
Just adding my voice so maybe by the time my grandkids are coding, GitHub Actions will support parallel steps. |
Beta Was this translation helpful? Give feedback.
-
Implementing parallel steps in GitHub Actions would significantly enhance CI/CD workflows, especially for tasks like deploying to multiple environments or managing dependencies across various services. For instance, in a mobile app development company, managing Docker containers and parallelizing tasks can help eliminate the complexity of sequential executions. This approach not only speeds up the development cycle but also ensures more efficient use of resources. Incorporating a feature that allows for parallel execution of steps within a single job, while maintaining access to the same environment and cache, would be a valuable addition. It would streamline processes and reduce the overhead associated with managing multiple jobs. Looking forward to seeing this feature implemented, as it would greatly improve the flexibility and efficiency of workflows in GitHub Actions. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Can you please raise a request to engineering for parallel steps support?
Eg. for logging in to multiple docker registries in parallel, or other actions which cannot be done in separate jobs because you require the local cache / side effects.
Uploading/downloading artifacts from adjacent jobs is not suitable for this use case.
Thanks
Hari
Beta Was this translation helpful? Give feedback.
All reactions