Merge branch 'develop' into feature/create-self-hosted-runner #2
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: Deploy the test runner vm to azure | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
paths-ignore: ["**.md"] | ||
jobs: | ||
deploy_test_vm: | ||
name: Deploy VM to azure | ||
runs-on: ubuntu-latest | ||
env: | ||
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} | ||
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} | ||
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} | ||
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} | ||
MLSTACKS_ANALYTICS_OPT_IN=false | ||
permissions: | ||
contents: "read" | ||
id-token: "write" | ||
defaults: | ||
run: | ||
working-directory: ./infrastructure | ||
steps: | ||
- name: Checkout the Code | ||
uses: actions/checkout@v3 | ||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v2 | ||
- name: Terraform fmt | ||
id: fmt | ||
run: terraform fmt -check | ||
continue-on-error: true | ||
- name: Terraform Init | ||
id: init | ||
run: terraform init | ||
- name: Terraform Validate | ||
id: validate | ||
run: terraform validate -no-color | ||
- run: terraform apply -auto-approve | ||
env: | ||
TF_VAR_github_runner_token: ${{ secrets.runner_token }} |