Skip to content

Workflows directory

All CI/CD workflows are stored in the .github/workflows directory in the root of your application and IaC repositories.

The default Golden Path setup assumes a structure where an application is built and pushed to both dev and prod environments via a single IaC repository.

Step 1: Create a configuration folder for dev environment

To separate dev and prod workflow configuration, we recommend creating a subdirectory for each environment.

For both infrastructure and application repository, create a _config/dev directory:

repo-iac/
mkdir -p .github/workflows/_config/dev
repo-app/
mkdir -p .github/workflows/_config/dev

Note: All workflow files from Boilerplate templates will be generated in the root of the workflows directory. The _config/dev/ directory is used to store configuration files for the environment.

Step 2: Create a common configuration file

For both infrastructure and application repository, create a common configuration file, change values according to the environment

repo-iac/.github/workflows/_config/dev/common-config.yml
AccountId: "1234567890"
Region: "eu-west-1"
Team: "pirates"
Environment: "pirates-dev"
repo-app/.github/workflows/_config/dev/common-config.yml
AccountId: "1234567890"
Region: "eu-west-1"
Team: "pirates"
Environment: "pirates-dev"

Step 3: Create a packages.yml file

For both infrastructure and application repository, create a packages.yml file in the _config/dev directory.

repo-iac/.github/workflows/_config/dev/packages.yml
DefaultPackagePathPrefix: "boilerplate/github-actions"
repo-app/.github/workflows/_config/dev/packages.yml
DefaultPackagePathPrefix: "boilerplate/github-actions"

DefaultPackagePathPrefix: this path is used by the ok tool to locate the GitHub Actions packages.

Commit your files

At this stage it is a good idea to commit your files.

Next step

Enable OIDC.