I have an action that is supposed to run a benchmark multiple times, however the step containing the loop ends after first execution of a command inside the loop.
I could reproduce the issue with a simpler case - with plain shell commands below
name: ci-pipeline
on: ["push"]
jobs:
benchmark:
steps:
- name: run a loop
run: |
for run in {1..3}; do
date;sleep 1;
done
When I run the for loop locally (everything below pipe above), I get:
Fri Jun 24 13:25:57 CEST 2022
Fri Jun 24 13:25:58 CEST 2022
Fri Jun 24 13:25:59 CEST 2022
However, in GitHub Action, when using:
for run in {1..3}; do
date;sleep 1;
done
shell: sh -e {0}
env:
PIP_EXTRA_INDEX_URL: ***url1 ***url2
The return I get is only:
Fri Jun 24 10:15:40 UTC 2022