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

Update how to handle job_id after GitHub officially providing the feature #908

Open
kachick opened this issue Aug 23, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@kachick
Copy link
Owner

kachick commented Aug 23, 2024

We should track this reply https://github.com/orgs/community/discussions/8945#discussioncomment-10429488

// Ideally this logic should be...
//
// 1. `trigger(context).jobId === smmmary(checkRun).jobId`
// But GitHub does not provide the jobId for each checkRun: https://github.com/orgs/community/discussions/8945
//
// or second place as
// 2. `context.jobName === checkRun.jobName`
// But GitHub does not provide the jobName for each context: https://github.com/orgs/community/discussions/16614
//
// On the otherhand, the conxtext.jobId will be used for the default jobName
// Anyway, in matrix use, GitHub uses the default name for the prefix. It should be considered in list based solutions
trigger.jobId === summary.jobName

wait-other-jobs/README.md

Lines 109 to 132 in 8993607

If you changed job name from the default, you should set `skip-list` or roughly use `skip-same-workflow`
```yaml
jobs:
your_job: # This will be used default job name if you not specify below "name" field
name: 'Changed at here'
runs-on: ubuntu-24.04
steps:
- uses: kachick/[email protected]
with:
skip-list: |
[
{
"workflowFile": "this_file_name.yml",
"jobName": "Changed at here"
}
]
timeout-minutes: 15
```
Similar problems should be considered in matrix use. Because of GitHub does not provide the context.
- https://github.com/orgs/community/discussions/8945
- https://github.com/orgs/community/discussions/16614

@kachick kachick added the enhancement New feature or request label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant