-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (52 loc) · 1.53 KB
/
sandbox.yml
File metadata and controls
56 lines (52 loc) · 1.53 KB
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
name: CI/CD Pipeline
run-name: "${{ github.actor }} - ${{ github.run_id }}"
on:
push:
branches: [main]
paths:
- 'src/**'
pull_request:
branches: [main]
paths:
- 'src/**'
workflow_dispatch:
inputs:
buildMode:
description: "Qual ação deseja fazer?"
required: true
default: 'Build'
type: choice
options:
- Build
- Build + Tag Validation
- Build + Tag Validation + Deploy
environments:
description: "Selecione o ambiente de implantação"
required: true
default: 'DEV'
type: environment
jobs:
build:
uses: felipementel/reusable-workflows/.github/workflows/python-sandbox-api-build.yml@main
with:
buildMode: 'Build + Push'
environment: 'DEV'
projectName: 'minha-api'
imageName: 'minha-api'
registryUsername: 'greennexus-core' # org no GHCR
secrets:
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
deploy:
needs: [build]
if: needs.build.outputs.image-exists == 'false'
uses: felipementel/reusable-workflows/.github/workflows/python-sandbox-api-deploy-aca.yml@main
with:
environment: 'DEV'
tagVersion: ${{ needs.build.outputs.tag-version }}
imageName: 'minha-api'
registryUsername: 'greennexus-core'
azureRgBase: ${{ vars.AZURE_RG }}
acaeBaseName: ${{ vars.AZURE_ACAE_BASE }}
secrets:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}