cypress-io / cypress-io/github-action
Change recommendation for ci-build-id?
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 353
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 27
Description
Hello!
Thanks for this action! It looks like Github has recently added context support for [`github.run_attempt`](https://github.com/actions/runner/releases/tag/v2.283.1). This action currently has to do backflips with the GH API in order to generate a unique (but predictable) `ci-build-id` property, but with the addition of `run_attempt`, I think you could probably deprecate that complexity. Eg:
```yaml
- name: E2E Tests
uses: cypress-io/github-action@v2
with:
record: true
parallel: true
ci-build-id: "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}"
```
I think this build ID would be guaranteed unique across all of Github for every run, even for reruns. `github.run_attempt` hasn't made the GHA documentation yet, so I'm not sure if it's stable enough to recommend right now, but I've verified that it's present for all of the current "Github Provided" runners.
Contributor guide
Assessment
This issue has not been assessed yet.