GSM Infrastructure uses two GitHub Actions workflows —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ti-infinite/GSMInfrastructure/llms.txt
Use this file to discover all available pages before exploring further.
deploy-infrastructure.yml and deploy-scheduler.yml — to deploy CloudFormation stacks automatically whenever the corresponding template files change on a tracked branch. Each branch maps to a fixed AWS environment (dev, qa, or prod), so merging a pull request from develop into quality or quality into main triggers the correct environment deploy without any manual configuration. Authentication to AWS is handled through OpenID Connect (OIDC), meaning no static AWS access keys are stored in GitHub Secrets.
Branch-to-environment mapping
| Branch | Environment | Stack name pattern |
|---|---|---|
develop | dev | dev-{appName}-*-stack |
quality | qa | qa-{appName}-*-stack |
main | prod | prod-{appName}-*-stack |
APP_NAME GitHub Actions variable, for example dev-gsmapplication-infrastructure-stack.
deploy-infrastructure.yml
The infrastructure workflow deploysdevops/infrastructure/template.yml to provision the S3, CloudFront, ECR, ECS, EC2, IAM, SNS, and AWS Budget resources described in the infrastructure stack guide.
Triggers:
- Push to
develop,quality, ormainwhendevops/infrastructure/template.ymlhas changed. workflow_dispatchwith anenvironmentinput (dev/qa/prod) for on-demand deploys.
- determine-env
- deploy
Runs first. Reads
github.ref_name (branch name) and maps it to the target environment string, or uses the workflow_dispatch input if the trigger was manual. The resolved environment is passed as a job output to the deploy job.deploy-scheduler.yml
The scheduler workflow deploysdevops/scheduler/template.yml to provision the EventBridge Scheduler rules and Lambda functions described in the scheduler stack guide. Its structure is identical to the infrastructure workflow but is independently controlled by the WORKFLOW_SCHEDULER_ENABLED variable.
Triggers:
- Push to
develop,quality, ormainwhendevops/scheduler/template.ymlhas changed. workflow_dispatchwith anenvironmentinput.
determine-env → deploy) as the infrastructure workflow. The CloudFormation stack name follows the pattern {env}-{appName}-scheduler-stack. All scheduler-specific parameters (EC2InstanceId, EIPAllocationId, ECSClusterName, service names, cron expressions) are sourced from GitHub Actions variables.
OIDC authentication flow
Neither workflow stores a staticAWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY. Instead, they use the aws-actions/configure-aws-credentials@v4 action with an id-token: write permission to obtain short-lived credentials via AWS STS:
- GitHub generates a signed OIDC token for the workflow run.
configure-aws-credentialspresents the token to the AWS STSAssumeRoleWithWebIdentityAPI.- AWS validates the token against the OIDC provider configured in your account and returns temporary credentials scoped to
AWS_INFRA_ROLE_ARN. - Subsequent steps in the job use those credentials transparently — no secrets are exposed in logs.
AWS_INFRA_ROLE_ARN secret must be set on each GitHub Actions environment (infra-dev, infra-qa, infra-prod) and must reference an IAM role whose trust policy allows sts:AssumeRoleWithWebIdentity from the GitHub OIDC provider (token.actions.githubusercontent.com) for your repository.
Manual dispatch
Both workflows expose aworkflow_dispatch trigger, allowing you to deploy to any environment outside of a branch push — useful for first-time setup, rollbacks, or deploying infrastructure changes before the template file is merged to a tracked branch.
The trigger block structure is identical in both workflows — they differ only in the path filter. The infrastructure workflow monitors devops/infrastructure/template.yml; the scheduler workflow monitors devops/scheduler/template.yml:
Enabling and disabling workflows
Both workflows are gated behind GitHub Actions repository variables that act as feature flags. Neither workflow will run — even on a matching push — if the flag is not set totrue.
| Variable | Workflow | Effect |
|---|---|---|
WORKFLOW_INFRASTRUCTURE_ENABLED | deploy-infrastructure.yml | Set to true to enable automatic infrastructure deploys. Any other value (or absent) skips both jobs. |
WORKFLOW_SCHEDULER_ENABLED | deploy-scheduler.yml | Set to true to enable automatic scheduler deploys. |
if condition of both the determine-env and deploy jobs:
infra-dev, infra-qa, infra-prod), you can set the variables at the environment level to enable deployments only for specific environments.
no-fail-on-empty-changeset: "1" is set in both workflows. If you push a change unrelated to the CloudFormation templates — such as a README update — and the path filter still causes the workflow to run, CloudFormation will detect no changes in the stack and the job will exit successfully rather than failing with a No updates are to be performed error.