-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ISSUE 406] Fix deploy Github Actions workflow (#407)
- Loading branch information
1 parent
ab6211e
commit 32343e6
Showing
8 changed files
with
116 additions
and
78 deletions.
There are no files selected for viewing
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,36 @@ | ||
name: Deploy Frontend | ||
# Need to set a default value for when the workflow is triggered from a git push | ||
# which bypasses the default configuration for inputs | ||
run-name: Deploy ${{ github.ref_name }} to Frontend ${{ inputs.environment || 'dev' }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "frontend/**" | ||
- "bin/**" | ||
- "infra/**" | ||
workflow_dispatch: | ||
inputs: | ||
app_name: | ||
description: "name of application folder under infra directory" | ||
default: frontend | ||
required: true | ||
type: string | ||
environment: | ||
description: "target environment" | ||
required: true | ||
default: "dev" | ||
type: choice | ||
options: | ||
- dev | ||
- prod | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
uses: ./.github/workflows/deploy.yml | ||
with: | ||
app_name: ${{ inputs.app_name || 'frontend' }} | ||
environment: ${{ inputs.environment || 'dev' }} |
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 |
---|---|---|
|
@@ -13,6 +13,9 @@ on: | |
- test/** | ||
- .github/workflows/ci-infra.yml | ||
|
||
env: | ||
APP_NAME: frontend | ||
|
||
jobs: | ||
check-terraform-format: | ||
name: Check Terraform format | ||
|
@@ -71,33 +74,33 @@ jobs: | |
uses: aquasecurity/[email protected] | ||
with: | ||
github_token: ${{ github.token }} | ||
# !! Uncomment to trigger automated infra tests once dev environment is set up | ||
# infra-test-e2e: | ||
# name: End-to-end tests | ||
# runs-on: ubuntu-latest | ||
# | ||
# permissions: | ||
# contents: read | ||
# id-token: write | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
|
||
# - uses: hashicorp/setup-terraform@v2 | ||
# with: | ||
# terraform_version: 1.2.1 | ||
# terraform_wrapper: false | ||
infra-test-e2e: | ||
name: End-to-end tests | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: hashicorp/setup-terraform@v2 | ||
with: | ||
terraform_version: 1.2.1 | ||
terraform_wrapper: false | ||
|
||
# - uses: actions/setup-go@v3 | ||
# with: | ||
# go-version: ">=1.19.0" | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ">=1.19.0" | ||
|
||
# - name: Configure AWS credentials | ||
# uses: ./.github/actions/configure-aws-credentials | ||
# with: | ||
# app_name: frontend | ||
# # Run infra CI on dev environment | ||
# environment: dev | ||
- name: Configure AWS credentials | ||
uses: ./.github/actions/configure-aws-credentials | ||
with: | ||
app_name: frontend | ||
# Run infra CI on dev environment | ||
environment: dev | ||
|
||
# - name: Run Terratest | ||
# run: make infra-test | ||
- name: Run Terratest | ||
run: make APP_NAME=${{ env.APP_NAME }} infra-test |
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
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