Skip to main content

CI/CD Pipeline

TL;DR — Git-Ape provides three GitHub Actions workflows: git-ape-plan (validate on PR), git-ape-deploy (deploy on merge), and git-ape-destroy (tear down on request). All use OIDC — no stored secrets.

Pipeline Architecture

Workflow Details

git-ape-plan.yml — Validate and Preview

Triggers: PR opened or updated with changes to .azure/deployments/**/template.json

StepAction
1Detect changed deployment directories
2Login to Azure via OIDC
3Validate ARM template (az deployment sub validate)
4Run what-if analysis (az deployment sub what-if)
5Post plan as PR comment with architecture diagram

git-ape-deploy.yml — Execute Deployment

Triggers: Push to main (PR merge) or /deploy comment on approved PR

StepAction
1Login to Azure via OIDC
2Validate template (safety re-check)
3Deploy (az deployment sub create)
4Run integration tests
5Commit state.json to repo

git-ape-destroy.yml — Tear Down

Triggers: Push to main with metadata.json status changed to destroy-requested

StepAction
1Read state.json for resource group name
2Inventory all resources
3Delete resource group (synchronous)
4Update state to destroyed, commit

OIDC Authentication

All workflows use OpenID Connect (OIDC) federated identity — no stored secrets:

permissions:
id-token: write
contents: write

steps:
- uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}