Add packer for build agent #30
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: Validate Infrastructure | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | |
jobs: | |
tests-terraform: | |
name: Tests Terraform Configuration | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
- name: Terraform Init | |
run: terraform init -backend=false | |
# Validate terraform files | |
- name: Terraform Validate | |
run: terraform validate | |
- name: Terraform Format | |
run: terraform fmt -check -recursive | |
test-iis-vm: | |
name: Test Packer Configurations for IIS VM | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Packer | |
uses: hashicorp/setup-packer@main | |
- name: Init Packer | |
run: packer init ./iis-vm.pkr.hcl | |
- name: Packer Format | |
run: packer fmt ./iis-vm.pkr.hcl | |
- name: Validate Packer | |
run: packer validate ./iis-vm.pkr.hcl |