Skip to content

Commit 5c2669c

Browse files
authored
Create sandbox.yml
1 parent 8862bcf commit 5c2669c

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/sandbox.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI/CD Pipeline
2+
run-name: "${{ github.actor }} - ${{ github.run_id }}"
3+
4+
on:
5+
push:
6+
branches: [main]
7+
paths:
8+
- 'src/**'
9+
pull_request:
10+
branches: [main]
11+
paths:
12+
- 'src/**'
13+
workflow_dispatch:
14+
inputs:
15+
buildMode:
16+
description: "Qual ação deseja fazer?"
17+
required: true
18+
default: 'Build'
19+
type: choice
20+
options:
21+
- Build
22+
- Build + Tag Validation
23+
- Build + Tag Validation + Deploy
24+
environments:
25+
description: "Selecione o ambiente de implantação"
26+
required: true
27+
default: 'DEV'
28+
type: environment
29+
30+
31+
jobs:
32+
build:
33+
uses: felipementel/reusable-workflows/.github/workflows/python-sandbox-api-build.yml@main
34+
with:
35+
buildMode: 'Build + Push'
36+
environment: 'DEV'
37+
projectName: 'minha-api'
38+
imageName: 'minha-api'
39+
registryUsername: 'greennexus-core' # org no GHCR
40+
secrets:
41+
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
42+
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
43+
44+
deploy:
45+
needs: [build]
46+
if: needs.build.outputs.image-exists == 'false'
47+
uses: felipementel/reusable-workflows/.github/workflows/python-sandbox-api-deploy-aca.yml@main
48+
with:
49+
environment: 'DEV'
50+
tagVersion: ${{ needs.build.outputs.tag-version }}
51+
imageName: 'minha-api'
52+
registryUsername: 'greennexus-core'
53+
azureRgBase: ${{ vars.AZURE_RG }}
54+
acaeBaseName: ${{ vars.AZURE_ACAE_BASE }}
55+
secrets:
56+
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}

0 commit comments

Comments
 (0)