data: regenerating based on the latest Swagger (#4577) #1073
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
--- | |
name: Regenerate the Terraform Provider | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'api-definitions/handwritten-resource-manager/**' | |
- 'api-definitions/resource-manager/**' | |
- 'tools/generator-terraform/**' | |
workflow_dispatch: # for manual invocations | |
concurrency: | |
group: 'regenterraform-${{ github.head_ref }}' | |
cancel-in-progress: true | |
jobs: | |
regenerate-terraform-provider: | |
runs-on: custom-linux-large | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
go-version: '1.22.7' | |
- name: "Launch SSH Agent" | |
run: | | |
# launch an ssh agent and export it's env vars | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
env: | |
SSH_AUTH_SOCK: /tmp/pandora_ssh_agent.sock | |
- name: "Load SSH Key" | |
run: | | |
# load the Deployment Write Key for the Terraform Provider AzureRM repository | |
echo "${{ secrets.TERRAFORM_AZURERM_PUBLIC_DEPLOYMENT_WRITE_KEY }}" | ssh-add - | |
env: | |
SSH_AUTH_SOCK: /tmp/pandora_ssh_agent.sock | |
- name: "Run the Terraform Generator" | |
run: | | |
# go go gadget generator | |
./scripts/automation-generate-and-commit-terraform.sh | |
env: | |
SSH_AUTH_SOCK: /tmp/pandora_ssh_agent.sock | |
- name: "Remove the Key from the SSH Agent" | |
if: always() | |
run: | | |
# remove the ssh key | |
ssh-add -D | |
env: | |
SSH_AUTH_SOCK: /tmp/pandora_ssh_agent.sock | |
- name: "Terminate the SSH Agent" | |
if: always() | |
run: | | |
pkill -9 ssh-agent |