AS_TOOK returns undefined when ran in multiple parallel workflow jobs
See original GitHub issueCode used in multiple parallel jobs:
- name: Notify Slack
if: contains(steps.deploy.outputs.result, 'successfully deployed')
uses: 8398a7/action-slack@v3
with:
status: custom
fields: workflow,job,commit,repo,ref,author,took
custom_payload: |
{
username: 'github-actions',
attachments: [{
color: 'good',
text: `blabla was successfully deployed with commit: ${process.env.AS_COMMIT} by ${{ github.actor }} via ${process.env.AS_WORKFLOW} & took ${process.env.AS_TOOK} to complete.`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DEPLOYMENTS }}
Returns:
Jobs look like this int he visual graph:
It also happens when there is a single slack notif job that runs on its own, but still depends on multiple previous parallel jobs.
same code works for a job that’s not ran in parallel with others
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Using jobs in a workflow
A workflow run is made up of one or more jobs , which run in parallel by default. To run jobs sequentially, you...
Read more >Multiple parallel undefined BackgroundWorker [duplicate]
1 Answer 1 ... I would recommend using Tasks instead of Backgroundworkers.You can run as many Tasks as you wish in a simple...
Read more >Run jobs in parallel with workflows to decrease your build ...
Learn how to use parallelism and workflows in your continuous integration and delivery (CI/CD) pipelines on CircleCI to improve efficiency ...
Read more >Create, run, and manage Azure Databricks Jobs
A workspace is limited to 1000 concurrent job runs. A 429 Too Many Requests response is returned when you request a run that...
Read more >Parallel steps | Workflows
A branch is a named set of steps that execute sequentially. Parallel branches can execute concurrently (with the steps in each branch executing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you. I will investigate based on this.
I’ve done it the hacky way, using the
GET /repos/{owner}/{repo}/actions/runs/{run_id} | jq -r '.created_at'
API and doing a comparison like this, in a self-hosted centos 7 based runner: