-
Notifications
You must be signed in to change notification settings - Fork 3
91 lines (79 loc) · 3.2 KB
/
dev_frontend_asa_pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# 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 }}"
# }