-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc8477b
commit 7a49471
Showing
6 changed files
with
227 additions
and
124 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
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 |
---|---|---|
@@ -1,91 +1,91 @@ | ||
name: Dev FE ASA Pull Request | ||
# name: Dev FE ASA Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- development | ||
paths: | ||
- 'frontend/**' | ||
# on: | ||
# pull_request: | ||
# branches: | ||
# - development | ||
# paths: | ||
# - 'frontend/**' | ||
|
||
env: | ||
TERRAFORM_VERSION: "1.5.7" | ||
TF_IN_AUTOMATION: "True" | ||
ENVIRONMENT: "dev" | ||
WORKING_DIR: "frontend" | ||
# env: | ||
# TERRAFORM_VERSION: "1.5.7" | ||
# TF_IN_AUTOMATION: "True" | ||
# ENVIRONMENT: "dev" | ||
# WORKING_DIR: "frontend" | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | ||
# jobs: | ||
# build: | ||
# permissions: | ||
# pull-requests: write | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
# - name: Setup Bun | ||
# uses: oven-sh/setup-bun@v1 | ||
# with: | ||
# bun-version: latest | ||
|
||
- name: Install dependencies | ||
working-directory: ${{ env.WORKING_DIR }} | ||
run: bun install | ||
# - name: Install dependencies | ||
# working-directory: ${{ env.WORKING_DIR }} | ||
# run: bun install | ||
|
||
# - name: Build Frontend | ||
# working-directory: ${{ env.WORKING_DIR }} | ||
# run: bun run build | ||
# # - name: Build Frontend | ||
# # working-directory: ${{ env.WORKING_DIR }} | ||
# # run: bun run build | ||
|
||
- name: Build Bun | ||
uses: ./.github/actions/tf-apply | ||
with: | ||
terraform_directory: "terraform/eus/${{ env.ENVIRONMENT }}/${{ env.WORKING_DIR }}_asa/build_bun" | ||
terraform_version: ${{ env.TERRAFORM_VERSION }} | ||
azure_client_id: ${{ secrets.ARM_CLIENT_ID }} | ||
azure_client_secret: ${{ secrets.ARM_CLIENT_SECRET }} | ||
azure_subscription_id: ${{ secrets.ARM_SUBSCRIPTION_ID }} | ||
azure_tenant_id: ${{ secrets.ARM_TENANT_ID }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
pr_id: ${{ github.event.pull_request.number }} | ||
tf_vars: | | ||
{ | ||
"environment": "${{ env.ENVIRONMENT }}", | ||
"commit_hash": "${{ github.event.pull_request.number }}", | ||
"frontend_dir": "../../../../../frontend" | ||
} | ||
# - name: Build Bun | ||
# uses: ./.github/actions/tf-apply | ||
# with: | ||
# terraform_directory: "terraform/eus/${{ env.ENVIRONMENT }}/${{ env.WORKING_DIR }}_asa/build_bun" | ||
# terraform_version: ${{ env.TERRAFORM_VERSION }} | ||
# azure_client_id: ${{ secrets.ARM_CLIENT_ID }} | ||
# azure_client_secret: ${{ secrets.ARM_CLIENT_SECRET }} | ||
# azure_subscription_id: ${{ secrets.ARM_SUBSCRIPTION_ID }} | ||
# azure_tenant_id: ${{ secrets.ARM_TENANT_ID }} | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# pr_id: ${{ github.event.pull_request.number }} | ||
# tf_vars: | | ||
# { | ||
# "environment": "${{ env.ENVIRONMENT }}", | ||
# "commit_hash": "${{ github.event.pull_request.number }}", | ||
# "frontend_dir": "../../../../../frontend" | ||
# } | ||
|
||
- name: Archive Artifacts | ||
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 #v4.0.0 | ||
with: | ||
name: ${{ env.WORKING_DIR }}-${{ env.ENVIRONMENT }}-build-${{ github.event.pull_request.number }} | ||
path: ${{ env.WORKING_DIR }}/build | ||
# - name: Archive Artifacts | ||
# uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 #v4.0.0 | ||
# with: | ||
# name: ${{ env.WORKING_DIR }}-${{ env.ENVIRONMENT }}-build-${{ github.event.pull_request.number }} | ||
# path: ${{ env.WORKING_DIR }}/build | ||
|
||
plan-deploy: | ||
needs: build | ||
permissions: | ||
pull-requests: write | ||
# plan-deploy: | ||
# needs: build | ||
# permissions: | ||
# pull-requests: write | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | ||
|
||
- name: Download Frontend Artifacts | ||
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 #v4.1 | ||
with: | ||
name: ${{ env.WORKING_DIR }}-${{ env.ENVIRONMENT }}-build-${{ github.event.pull_request.number }} | ||
path: ${{ env.WORKING_DIR }}/build | ||
# - name: Download Frontend Artifacts | ||
# uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 #v4.1 | ||
# with: | ||
# name: ${{ env.WORKING_DIR }}-${{ env.ENVIRONMENT }}-build-${{ github.event.pull_request.number }} | ||
# path: ${{ env.WORKING_DIR }}/build | ||
|
||
- name: Terraform Plan | ||
uses: ./.github/actions/tf-plan | ||
with: | ||
terraform_directory: "terraform/eus/${{ env.ENVIRONMENT }}/frontend_asa" | ||
terraform_version: ${{ env.TERRAFORM_VERSION }} | ||
azure_client_id: ${{ secrets.ARM_CLIENT_ID }} | ||
azure_client_secret: ${{ secrets.ARM_CLIENT_SECRET }} | ||
azure_subscription_id: ${{ secrets.ARM_SUBSCRIPTION_ID }} | ||
azure_tenant_id: ${{ secrets.ARM_TENANT_ID }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
pr_id: ${{ github.event.pull_request.number }} | ||
tf_vars: | | ||
{ | ||
"environment": "${{ env.ENVIRONMENT }}", | ||
"commit_hash": "${{ github.event.pull_request.number }}" | ||
} | ||
# - name: Terraform Plan | ||
# uses: ./.github/actions/tf-plan | ||
# with: | ||
# terraform_directory: "terraform/eus/${{ env.ENVIRONMENT }}/frontend_asa" | ||
# terraform_version: ${{ env.TERRAFORM_VERSION }} | ||
# azure_client_id: ${{ secrets.ARM_CLIENT_ID }} | ||
# azure_client_secret: ${{ secrets.ARM_CLIENT_SECRET }} | ||
# azure_subscription_id: ${{ secrets.ARM_SUBSCRIPTION_ID }} | ||
# azure_tenant_id: ${{ secrets.ARM_TENANT_ID }} | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# pr_id: ${{ github.event.pull_request.number }} | ||
# tf_vars: | | ||
# { | ||
# "environment": "${{ env.ENVIRONMENT }}", | ||
# "commit_hash": "${{ github.event.pull_request.number }}" | ||
# } |
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 |
---|---|---|
@@ -1,48 +1,48 @@ | ||
name: Dev FE ASA Pull Request Merged | ||
# name: Dev FE ASA Pull Request Merged | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- development | ||
paths: | ||
- 'frontend/**' | ||
# on: | ||
# pull_request: | ||
# types: | ||
# - closed | ||
# branches: | ||
# - development | ||
# paths: | ||
# - 'frontend/**' | ||
|
||
env: | ||
TERRAFORM_VERSION: "1.5.7" | ||
TF_IN_AUTOMATION: "True" | ||
ENVIRONMENT: "dev" | ||
WORKING_DIR: "frontend" | ||
# env: | ||
# TERRAFORM_VERSION: "1.5.7" | ||
# TF_IN_AUTOMATION: "True" | ||
# ENVIRONMENT: "dev" | ||
# WORKING_DIR: "frontend" | ||
|
||
jobs: | ||
apply-deploy: | ||
permissions: | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.merged }} | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | ||
# jobs: | ||
# apply-deploy: | ||
# permissions: | ||
# pull-requests: write | ||
# runs-on: ubuntu-latest | ||
# if: ${{ github.event.pull_request.merged }} | ||
# steps: | ||
# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | ||
|
||
- name: Load Archived build | ||
id: download-plan | ||
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d #v3.0.0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
workflow: ${{ env.ENVIRONMENT }}_${{ env.WORKING_DIR }}_asa_pr.yml | ||
pr: ${{ github.event.pull_request.number }} | ||
name: ${{ env.WORKING_DIR }}-${{ env.ENVIRONMENT }}-build-${{ github.event.pull_request.number }} | ||
path: ${{ env.WORKING_DIR }}/build | ||
# - name: Load Archived build | ||
# id: download-plan | ||
# uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d #v3.0.0 | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# workflow: ${{ env.ENVIRONMENT }}_${{ env.WORKING_DIR }}_asa_pr.yml | ||
# pr: ${{ github.event.pull_request.number }} | ||
# name: ${{ env.WORKING_DIR }}-${{ env.ENVIRONMENT }}-build-${{ github.event.pull_request.number }} | ||
# path: ${{ env.WORKING_DIR }}/build | ||
|
||
- name: Terraform Apply | ||
uses: ./.github/actions/tf-apply | ||
with: | ||
terraform_directory: "terraform/eus/${{ env.ENVIRONMENT }}/${{ env.WORKING_DIR }}_asa" | ||
terraform_version: ${{ env.TERRAFORM_VERSION }} | ||
azure_client_id: ${{ secrets.ARM_CLIENT_ID }} | ||
azure_client_secret: ${{ secrets.ARM_CLIENT_SECRET }} | ||
azure_subscription_id: ${{ secrets.ARM_SUBSCRIPTION_ID }} | ||
azure_tenant_id: ${{ secrets.ARM_TENANT_ID }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
pr_id: ${{ github.event.pull_request.number }} | ||
plan_workflow_file: ${{ env.ENVIRONMENT }}_${{ env.WORKING_DIR }}_asa_pr.yml | ||
# - name: Terraform Apply | ||
# uses: ./.github/actions/tf-apply | ||
# with: | ||
# terraform_directory: "terraform/eus/${{ env.ENVIRONMENT }}/${{ env.WORKING_DIR }}_asa" | ||
# terraform_version: ${{ env.TERRAFORM_VERSION }} | ||
# azure_client_id: ${{ secrets.ARM_CLIENT_ID }} | ||
# azure_client_secret: ${{ secrets.ARM_CLIENT_SECRET }} | ||
# azure_subscription_id: ${{ secrets.ARM_SUBSCRIPTION_ID }} | ||
# azure_tenant_id: ${{ secrets.ARM_TENANT_ID }} | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# pr_id: ${{ github.event.pull_request.number }} | ||
# plan_workflow_file: ${{ env.ENVIRONMENT }}_${{ env.WORKING_DIR }}_asa_pr.yml |
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