github-action icon indicating copy to clipboard operation
github-action copied to clipboard

Change recommendation for ci-build-id?

Open rbayliss opened this issue 4 years ago • 11 comments

Hello! Thanks for this action! It looks like Github has recently added context support for github.run_attempt. 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:

- 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.

rbayliss avatar Sep 28 '21 18:09 rbayliss

  • This needs to be revisited. See also https://github.com/cypress-io/github-action/issues/1074

MikeMcC399 avatar Nov 07 '23 08:11 MikeMcC399