-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update-edit-form-focus-and-ui
- Loading branch information
Showing
35 changed files
with
1,608 additions
and
267 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Create pull request to branch | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
head: | ||
type: string | ||
default: ${{ github.ref_name }} | ||
base: | ||
required: true | ||
type: string | ||
|
||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
HEAD: ${{ inputs.head }} | ||
BASE: ${{ inputs.base }} | ||
|
||
jobs: | ||
create-pr: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
pr_number: ${{ steps.pr-number.outputs.pull_request_number }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check for existing PR | ||
id: check-pr | ||
run: | | ||
PR=$(gh pr list --base ${BASE} --head ${HEAD} --json number --jq '.[0].number') | ||
echo "::set-output name=pr_exists::$PR" | ||
- name: Create pull request | ||
if: steps.check-pr.outputs.pr_exists == '' | ||
run: | | ||
gh pr create \ | ||
--label "autogenerated" \ | ||
--base ${BASE} --head ${HEAD} \ | ||
--title "Deploy to ${BASE}" \ | ||
--body "Automated PR to sync changes from ${HEAD} to ${BASE}." | ||
- name: Get pull request number | ||
id: pr-number | ||
run: echo "pull_request_number=$(gh pr view --json number -q .number || echo "")" >> $GITHUB_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Add Terraform CDK plan as comment on pull request | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
deploy-env: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
terraform: | ||
runs-on: ubuntu-latest | ||
env: | ||
DEPLOY_ENV: ${{ inputs.deploy-env }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Read node version from `.nvmrc` file | ||
id: nvmrc | ||
shell: bash | ||
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | ||
|
||
- name: Install required node.js version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Initialize Terraform CDK configuration | ||
shell: bash | ||
working-directory: infra | ||
run: | | ||
pnpm cdktf get | ||
pnpm build:tsc | ||
- name: Install CloudFoundry CLI | ||
run: | | ||
curl -L "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=github" | sudo tar -zx --directory=/usr/local/bin | ||
cf --version | ||
- name: Configure CloudFoundry API endpoint | ||
run: | | ||
cf api https://api.fr.cloud.gov | ||
- name: Synthesize Terraform configuration | ||
working-directory: infra | ||
run: | | ||
DEPLOY_ENV=${DEPLOY_ENV} pnpm cdktf synth | ||
- name: Get Terraform stack name | ||
id: get_stack_name | ||
working-directory: infra | ||
run: | | ||
DEPLOY_ENV=${DEPLOY_ENV} pnpm cdktf output --outputs-file outputs.json | ||
echo "stack_name=$(jq -r 'keys[0]' outputs.json)" >> $GITHUB_OUTPUT | ||
- name: Create Terraform plan | ||
uses: dflook/terraform-plan@v1 | ||
with: | ||
path: infra/cdktf.out/stacks/${{ steps.get_stack_name.outputs.stack_name }} | ||
label: ${{ steps.get_stack_name.outputs.stack_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Post Terraform plan to PR comment | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- staging | ||
- main | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
|
||
jobs: | ||
add-terraform-plan-to-staging-pr: | ||
uses: ./.github/workflows/_terraform-plan-pr-comment.yml | ||
secrets: inherit | ||
with: | ||
deploy-env: staging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Create PR from main to staging | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
create-pr-to-staging: | ||
uses: ./.github/workflows/_pr-create.yml | ||
secrets: inherit | ||
with: | ||
base: staging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.