Files
iac-opentofu-public/.gitea/workflows/ci-test.yaml
2025-08-18 19:06:54 +00:00

43 lines
944 B
YAML

name: Teste Runner Bare-Metal
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
hello:
#precisa da imagem costum do opentofu
runs-on: [ fenix-opentofu ]
env:
CONSUL_HTTP_TOKEN: ${{ secrets.CONSUL_HTTP_TOKEN }}
steps:
- name: Updating apt-get
run: |
apt-get update -y
- name: Cloning iac repository
uses: actions/checkout@v4
with:
path: infra/iac
- name: cloning iac secrets repository
run: |
git clone https://gitea.fenix-dev.com/fenix-gitea-admin/iac-teste-secrets.git infra/secrets
- name: Init OpenTofu
working-directory: infra
run: tofu init
- name: Plan
run: tofu plan -out=tfplan
- name: Export tfplan
uses: actions/upload-artifact@v4
with:
name: tofu-plan
path: tfplan
- name: Apply
run: tofu apply -auto-approve tfplan