Skip to content

Commit 534464b

Browse files
github-actions[bot]danielnaabCopilot
authored
Deploy to demo (#1)
Automated PR to sync changes from main to demo. --------- Co-authored-by: Daniel Naab <daniel.naab@gsa.gov> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Daniel Naab <dnaab@flexion.us> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c503a8b commit 534464b

345 files changed

Lines changed: 8100 additions & 3533 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/old-wolves-speak.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/_docker-build-image.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ env:
2727
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
2828
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
2929
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
30-
AWS_REGION: us-east-2
31-
ECR_REPOSITORY: tts-10x-forms-${{ inputs.deploy-key }}-image-${{ inputs.app-name }}
30+
AWS_REGION: us-east-1
31+
ECR_REPOSITORY: flexion-forms-sandbox-${{ inputs.deploy-key }}
3232

3333
jobs:
3434
setup:
@@ -57,16 +57,16 @@ jobs:
5757
run: |
5858
docker push --all-tags ${REGISTRY_PATH}
5959
60-
# - name: Log in to AWS ECR
61-
# run: |
62-
# aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com
60+
- name: Log in to AWS ECR
61+
run: |
62+
aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com
6363
64-
# - name: Tag Docker image for ECR
65-
# run: |
66-
# docker tag ${REGISTRY_PATH}:${COMMIT_SHA} ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${ECR_REPOSITORY}:${COMMIT_SHA}
67-
# docker tag ${REGISTRY_PATH}:${TAG_NAME} ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${ECR_REPOSITORY}:${TAG_NAME}
64+
- name: Tag Docker image for ECR
65+
run: |
66+
docker tag ${REGISTRY_PATH}:${COMMIT_SHA} ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${ECR_REPOSITORY}:${COMMIT_SHA}
67+
docker tag ${REGISTRY_PATH}:${COMMIT_SHA} ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${ECR_REPOSITORY}:latest
6868
69-
# - name: Push Docker image to ECR
70-
# run: |
71-
# docker push ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${ECR_REPOSITORY}:${COMMIT_SHA}
72-
# docker push ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${ECR_REPOSITORY}:${TAG_NAME}
69+
- name: Push Docker image to ECR
70+
run: |
71+
docker push ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${ECR_REPOSITORY}:${COMMIT_SHA}
72+
docker push ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${ECR_REPOSITORY}:latest

.github/workflows/_terraform-apply.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ jobs:
5757

5858
- name: Generate Terraform CDK provider constructs
5959
shell: bash
60-
run: pnpm --filter @gsa-tts/forms-infra-cdktf build:get
60+
run: pnpm --filter @flexion/forms-infra-cdktf build:get
6161

6262
- name: Initialize Terraform CDK configuration
6363
shell: bash
64-
run: pnpm turbo run --filter @gsa-tts/forms-infra-cdktf build
64+
run: pnpm turbo run --filter @flexion/forms-infra-cdktf build
6565

6666
- name: Install CloudFoundry CLI
6767
run: |

.github/workflows/_terraform-plan-pr-comment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ jobs:
6868
6969
- name: Generate Terraform CDK provider constructs
7070
shell: bash
71-
run: pnpm --filter @gsa-tts/forms-infra-cdktf build:get
71+
run: pnpm --filter @flexion/forms-infra-cdktf build:get
7272

7373
- name: Build Terraform configuration
7474
shell: bash
75-
run: pnpm turbo run --filter @gsa-tts/forms-infra-cdktf build
75+
run: NODE_OPTIONS=--max-old-space-size=6144 pnpm turbo run --filter @flexion/forms-infra-cdktf build
7676

7777
- name: Get Terraform stack name
7878
id: get_stack_name

.github/workflows/add-terraform-plan-to-pr.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
name: Post Terraform plan to PR comment
22

33
on:
4-
pull_request:
5-
branches:
6-
- demo
7-
- main
8-
types:
9-
- opened
10-
- synchronize
11-
- reopened
4+
workflow_dispatch:
5+
# pull_request:
6+
# branches:
7+
# - demo
8+
# - main
9+
# types:
10+
# - opened
11+
# - synchronize
12+
# - reopened
1213

1314
jobs:
1415
add-terraform-plan-to-demo-pr:
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Claude Code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
# Optional: Only run on specific file changes
7+
# paths:
8+
# - "src/**/*.ts"
9+
# - "src/**/*.tsx"
10+
# - "src/**/*.js"
11+
# - "src/**/*.jsx"
12+
13+
jobs:
14+
claude-review:
15+
# Optional: Filter by PR author
16+
# if: |
17+
# github.event.pull_request.user.login == 'external-contributor' ||
18+
# github.event.pull_request.user.login == 'new-developer' ||
19+
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20+
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
pull-requests: read
25+
issues: read
26+
id-token: write
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 1
33+
34+
- name: Run Claude Code Review
35+
id: claude-review
36+
uses: anthropics/claude-code-action@v1
37+
with:
38+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39+
prompt: |
40+
REPO: ${{ github.repository }}
41+
PR NUMBER: ${{ github.event.pull_request.number }}
42+
43+
Please review this pull request and provide feedback on:
44+
- Code quality and best practices
45+
- Potential bugs or issues
46+
- Performance considerations
47+
- Security concerns
48+
- Test coverage
49+
50+
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
51+
52+
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
53+
54+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
55+
# or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options
56+
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
57+

.github/workflows/claude.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
actions: read # Required for Claude to read CI results on PRs
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
33+
- name: Run Claude Code
34+
id: claude
35+
uses: anthropics/claude-code-action@v1
36+
with:
37+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38+
39+
# This is an optional setting that allows Claude to read CI results on PRs
40+
additional_permissions: |
41+
actions: read
42+
43+
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44+
# prompt: 'Update the pull request description to include a summary of changes.'
45+
46+
# Optional: Add claude_args to customize behavior and configuration
47+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48+
# or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options
49+
# claude_args: '--model claude-opus-4-1-20250805 --allowed-tools Bash(gh pr:*)'
50+

.github/workflows/deploy.yml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
name: 'Deploy'
22

3+
# Triggers on pushes to main or demo branches
4+
# Builds Docker image and pushes to:
5+
# - GitHub Container Registry (ghcr.io)
6+
# - AWS ECR (requires ECR repositories to exist first)
7+
#
8+
# PREREQUISITES:
9+
# 1. Deploy infrastructure first to create ECR repositories:
10+
# cd infra/cdktf
11+
# pnpm deploy:aws-main # for main branch
12+
# pnpm deploy:aws-demo # for demo branch
13+
#
14+
# 2. Configure GitHub secrets:
15+
# - AWS_ACCOUNT_ID
16+
# - AWS_ACCESS_KEY_ID
17+
# - AWS_SECRET_ACCESS_KEY
18+
#
19+
# DEPLOYMENT FLOW:
20+
# - Push to main branch → builds image → pushes to flexion-forms-sandbox-main ECR
21+
# - Push to demo branch → builds image → pushes to flexion-forms-sandbox-demo ECR
22+
# - App Runner auto-deploys when new images are detected (autoDeploymentsEnabled: true)
23+
324
on:
425
push:
526
branches:
@@ -8,18 +29,23 @@ on:
829
workflow_dispatch:
930

1031
jobs:
11-
build-image:
32+
build-and-push-image:
1233
uses: ./.github/workflows/_docker-build-image.yml
1334
secrets: inherit
1435
with:
1536
app-name: sandbox
1637
tag-name: ${{ github.ref_name }}
1738
deploy-key: ${{ github.ref_name }}
1839

19-
deploy:
20-
needs: [build-image]
21-
uses: ./.github/workflows/_terraform-apply.yml
22-
secrets: inherit
23-
with:
24-
deploy-env: ${{ github.ref_name }}
25-
#deploy-env: main
40+
# Terraform deployment is handled separately/manually for now
41+
# To deploy infrastructure changes:
42+
# cd infra/cdktf
43+
# DEPLOY_ENV=aws-main pnpm deploy # or aws-demo
44+
#
45+
# Future: Automate Terraform deployment for AWS
46+
# deploy-infrastructure:
47+
# needs: [build-and-push-image]
48+
# uses: ./.github/workflows/_terraform-apply.yml
49+
# secrets: inherit
50+
# with:
51+
# deploy-env: aws-${{ github.ref_name }}

.github/workflows/release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
inputs:
8-
playwright-version:
9-
description: "Set the Playwright version"
10-
default: "1.51.1"
117

128
concurrency: ${{ github.workflow }}-${{ github.ref }}
139

@@ -54,4 +50,4 @@ jobs:
5450
publish: pnpm release
5551
env:
5652
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
53+
#NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/run-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ on:
99
jobs:
1010
run-tests:
1111
uses: ./.github/workflows/_validate.yml
12-
e2e:
13-
uses: ./.github/workflows/_end-to-end.yml
14-
secrets: inherit
12+
# e2e:
13+
# uses: ./.github/workflows/_end-to-end.yml
14+
# secrets: inherit

0 commit comments

Comments
 (0)