You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/pr-open.yml
+13-6Lines changed: 13 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@ name: PR
2
2
3
3
on:
4
4
pull_request:
5
+
5
6
workflow_dispatch:
6
7
7
8
concurrency:
@@ -13,6 +14,7 @@ permissions:
13
14
contents: write # This is required for actions/checkout
14
15
packages: write
15
16
pull-requests: write
17
+
security-events: write
16
18
env:
17
19
AWS_REGION: ca-central-1
18
20
jobs:
@@ -41,26 +43,31 @@ jobs:
41
43
with:
42
44
environment_name: dev
43
45
command: plan
44
-
tag: ${{ github.event.number || 'latest' }} # this is the tag of the containers to deploy, defaults to test
45
-
app_env: ephermal-${{ github.event.number || 'latest' }} # ephermal, prefixed for easy clean up of PR resources in s3 and dynamodb generated by terraform
46
+
tag: ${{ github.event.number || 'latest' }}
47
+
app_env: ${{ github.event.number || 'latest' }} # ephermal, prefixed for easy clean up of PR resources in s3 and dynamodb generated by terraform
Copy file name to clipboardExpand all lines: GHA.md
+27-7Lines changed: 27 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,21 +14,29 @@ The workflows in this repository are organized into three main categories:
14
14
15
15
### `pr-open.yml`
16
16
17
-
**Trigger**: Pull request open or update
17
+
**Trigger**:
18
+
- Pull request open or update
19
+
- Manual workflow dispatch (for deploying to dev environment)
18
20
19
-
**Purpose**: Validates the proposed changes to ensure they meet quality standards and work as expected.
21
+
**Purpose**: Validates the proposed changes to ensure they meet quality standards and work as expected. Additionally allows manual deployment to the dev environment through workflow dispatch.
20
22
21
23
**Steps**:
22
-
1. Builds container images for backend, frontend, and migrations, tagging them with the PR number
24
+
1. Builds container images for backend, frontend, and migrations, tagging them with:
25
+
- The PR number (for PR events)
26
+
- 'manual' tag (for workflow dispatch events)
27
+
- 'latest' tag
28
+
- 'pr-{number}' tag
23
29
2. Runs comprehensive tests on the codebase including:
24
30
- Backend unit tests with a PostgreSQL service container
25
31
- Frontend unit tests
26
32
- Security scanning with Trivy
27
33
3. SonarCloud analysis for code quality
28
-
4. Creates a preview environment (when comments contain `/deploy`)
29
-
5. Runs end-to-end tests using Playwright
34
+
4. Plans infrastructure changes using Terraform/Terragrunt
35
+
5. For workflow dispatch events:
36
+
- Resumes any paused resources in the dev environment
37
+
- Deploys the stack to the dev environment for testing
30
38
31
-
**Outputs**: Container images tagged with PR number, test results, SonarCloud reports
39
+
**Outputs**: Container images with appropriate tags, test results, SonarCloud reports, and (for workflow dispatch) a deployed environment
32
40
33
41
### `pr-validate.yml`
34
42
@@ -198,8 +206,10 @@ The workflows in this repository are organized into three main categories:
198
206
The workflows use the following environment configurations:
199
207
200
208
1.**Development (dev)**: Used for continuous integration and feature testing
209
+
- Can be deployed manually via workflow dispatch on the PR workflow
210
+
- Serves as the target for merged PRs from the main branch
201
211
2.**Testing (test)**: Used for QA and acceptance testing
202
-
3.**Production (prod)**: Used for live production deployments
212
+
3.**Production (prod)**: Used for live production deployments via the release workflow
0 commit comments