Any way to detect re-run inside of workflow

Appveyor provides the following env-variables:

  • APPVEYOR_FORCED_BUILD (true for “builds started by “New build” button or from the same API”)
  • APPVEYOR_RE_BUILD (true for “build started by “Re-build commit/PR” button of from the same API”)

is there anything similar in gh-actions?

As I see it there is no way to directly start a workflow, so I feel the problem is “reduced” to the question: Is there any way to detect in the running workflow, whether the current run is a re-run or not?

Hi @nils-a,
In workflow run result page, there is a re-run information.


But currently , there is no way to check whether the workflow run is a re-run one inside the workflow run.
Would you mind submitting a feature request asking for a flag for re-run in the Feedback form for GitHub Actions?

The feature-request was submitted.

1 Like