How to observe a lifeycle with environments on github actions?

I’d like to use github actions for my infrastructure deployment (terraform) project, but i dont see the ability to define a lifecycle.

My use case is this.

  • create a repo which is effectively the terraform code needed to deploy my infra.
  • create environments in github and add specific variables to that.
  • create a github action which deploys the above through a stage. the stage should run x times where x is the number of environments and the environments are in a specific order.

the only way i can currently see to do this is by repeating the yaml code for each environment as a stage, but if i introduce new steps, this might mean duplicating those steps in all of the stages. i dont want to do this.

AzDO / octopus all have this, so is github actions late to this party or have i totally missed how it implements it?