Aula 5 - Create Azure DevOps Repository #6
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
on: | |
workflow_dispatch: | |
inputs: | |
project: | |
description: "Project Name" | |
required: true | |
default: "ada_pipelines_maio" | |
repositoryName: | |
description: "Repository Name" | |
type: string | |
required: true | |
grupoRevisores: | |
description: "Nome do grupo de revisores" | |
required: true | |
type: choice | |
default: "Contributors" | |
options: | |
- DevOps | |
- Contributors | |
- CreditoTeam | |
name: "Aula 5 - Create Azure DevOps Repository" | |
jobs: | |
create-repository: | |
environment: production | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: hashicorp/setup-terraform@v3 | |
name: Setup Terraform | |
- name: "Terraform Init" | |
run: terraform init | |
working-directory: ./aula_5/terraform | |
- name: "Terraform Apply" | |
run: terraform apply -auto-approve -input=false -var="repository_name=${{ inputs.repositoryName }}" | |
if: github.event_name == 'workflow_dispatch' | |
working-directory: ./aula_5/terraform | |
env: | |
AZDO_ORG_SERVICE_URL: ${{ vars.AZDO_ORG_SERVICE_URL }} | |
AZDO_PERSONAL_ACCESS_TOKEN: ${{ secrets.AZDO_PERSONAL_ACCESS_TOKEN }} | |
TF_VAR_project_name: ${{ inputs.project }} | |
TF_VAR_reviewers_group_name: ${{ inputs.grupoRevisores }} |