Compare commits
8 Commits
e3f385d0a4
...
141-update
| Author | SHA1 | Date | |
|---|---|---|---|
| 4eccf8e83c | |||
| a4778d29be | |||
| 5c04870d37 | |||
| c81b514ae8 | |||
| 5a07318527 | |||
| 99e5d162ef | |||
| 755c429d04 | |||
| 6ea7326a57 |
@@ -33,4 +33,6 @@ jobs:
|
|||||||
api:
|
api:
|
||||||
- 'api/**'
|
- 'api/**'
|
||||||
client:
|
client:
|
||||||
- 'client/**'
|
- 'client/**'
|
||||||
|
infrastructure:
|
||||||
|
- 'infrastructure/**'
|
||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
name: deploy
|
name: deploy
|
||||||
needs:
|
needs:
|
||||||
- changes
|
- changes
|
||||||
- build
|
- build-and-test
|
||||||
uses: ./.gitea/workflows/deploy.yaml
|
uses: ./.gitea/workflows/deploy.yaml
|
||||||
with:
|
with:
|
||||||
app_name: flying
|
app_name: flying
|
||||||
|
|||||||
@@ -17,3 +17,13 @@ jobs:
|
|||||||
environment_name: test
|
environment_name: test
|
||||||
version_number: ${{ github.run_id }}
|
version_number: ${{ github.run_id }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
terraform:
|
||||||
|
if: ${{ needs.changes.outputs.infrastructure == 'true' }}
|
||||||
|
name: terraform-plan
|
||||||
|
needs:
|
||||||
|
- changes
|
||||||
|
uses: ./.gitea/workflows/infrastructure.yaml
|
||||||
|
with:
|
||||||
|
environment_name: test
|
||||||
|
secrets: inherit
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ on:
|
|||||||
- '**'
|
- '**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-and-test:
|
||||||
name: build
|
name: build-and-test
|
||||||
uses: ./.gitea/workflows/build_and_test.yaml
|
uses: ./.gitea/workflows/build_and_test.yaml
|
||||||
with:
|
with:
|
||||||
environment_name: prod
|
environment_name: prod
|
||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
name: deploy
|
name: deploy
|
||||||
needs:
|
needs:
|
||||||
- build
|
- build-and-test
|
||||||
uses: ./.gitea/workflows/deploy.yaml
|
uses: ./.gitea/workflows/deploy.yaml
|
||||||
with:
|
with:
|
||||||
app_name: flying
|
app_name: flying
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: 'Infrastructure'
|
name: 'Terraform'
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
@@ -6,7 +6,7 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
infrastructure:
|
terraform:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment:
|
environment:
|
||||||
steps:
|
steps:
|
||||||
@@ -30,14 +30,16 @@ jobs:
|
|||||||
uses: hashicorp/setup-terraform@v4
|
uses: hashicorp/setup-terraform@v4
|
||||||
|
|
||||||
- name: Terraform init
|
- name: Terraform init
|
||||||
uses: |
|
run: |
|
||||||
terraform init -input=false
|
terraform -chdir=./infrastructure init -input=false
|
||||||
|
|
||||||
- name: Terraform plan
|
- name: Terraform plan
|
||||||
uses: |
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
terraform plan -no-color -input=false
|
run: |
|
||||||
|
terraform -chdir=./infrastructure plan -no-color -input=false
|
||||||
|
|
||||||
- name: Terraform apply
|
- name: Terraform apply
|
||||||
uses: |
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
terraform apply -no-color -
|
run: |
|
||||||
|
terraform -chdir=./infrastructure apply -no-color -input=false
|
||||||
|
|
||||||
Reference in New Issue
Block a user