Two pushes close together start two runs, and two deploys to staging at about the same time. Try it: two commits, each pushed straight away.
git commit --allow-empty -m "One" && git push && git commit --allow-empty -m "Two" && git push--allow-empty makes a commit with no changes, handy for starting a run. Wait until both runs have finished, then read the red one's log.
concurrency runs one job of a group at a time. A later one waits for the earlier one to finish:
deploy:
needs: image
concurrency: stagingThe group's name is yours to choose, and it reaches across runs. Put it on the job that must take turns. A workflow can have concurrency: at the top too, and then whole runs wait.
Objectives
- What does the second run's deploy step say went wrong?
- One at a time.