Update index.js #22
Workflow file for this run
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
name: Dev FE ASA Pull Request | |
on: | |
pull_request: | |
branches: | |
- development | |
paths: | |
- '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 | |
- 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: 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: 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 | |
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: 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 }}" | |
} |