${{ github.run_attempt }} stays at 1

I have a problem with:
${{ github.run_attempt }}
It does not increment after workflow runs and stays at 1.
Anyone else experience this?

Do you have a public example?

1 Like

It is expected to be 1 whenever a workflow run is triggered normally, and only incremented if you use the functionality to re-run jobs. github.run_number on the other hand counts how often the workflow was triggered normally and does not increase if you re-run jobs.

FWIW, if you have two jobs, re-run one of them, then re-run both, the run attempt number will be three in both jobs, because the number of overall workflow run attempts is counted, not how often each job was run.

1 Like