Skip to content

libre-devops/azure-packer-gh-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Libre DevOps - Azure Terraform GitHub Action

Hello 👋

This is an action for running Packer on Azure

Example Usage

name: 'Packer Build'

# Allow run manually
on:
  workflow_dispatch:

jobs:
  azure-terraform-job:
    name: 'Terraform Build'
    runs-on: ubuntu-latest
    environment: tst

    # Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
    defaults:
      run:
        shell: bash

    steps:
      - uses: actions/checkout@v3

      - name: Libre DevOps - Run Packer for Azure - GitHub Action
        env:
          PKR_VAR_dockerhub_login: ${{ secrets.DockerHubUsername }}
          PKR_VAR_dockerhub_password: ${{ secrets.DockerHubPassword }}
        id: packer-build
        uses: libre-devops/azure-packer-gh-action@v1
        with:
          packer-template-path: "packer/linux/ubuntu/2204/ubuntu2204.pkr.hcl"
          packer-client-id: ${{ secrets.SpokeSvpClientId }}
          packer-client-secret: ${{ secrets.SpokeSvpClientSecret }}
          packer-subscription-id: ${{ secrets.SpokeSubId }}
          packer-tenant-id: ${{ secrets.SpokeTenantId }}