Skip to content

Commit

Permalink
add: test jinja action packer
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvija Tovernic committed Sep 19, 2024
1 parent e1a04b5 commit 4e5201a
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/packer-build-if-vm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Image Factory VM

on:
push:
paths:
- ".github/workflows/packer-build-if-runner-host-vm.yml"
- "images/packer/image-factory-vm"
workflow_dispatch:

jobs:
packer-build:
runs-on: ubuntu-latest

env:
IMAGE_NAME: "image-factory-runner"
IMAGE_TAG: "${{ github.run_number }}"
IMAGE_FOLDER: "images/docker/image-factory-runner"
REGISTRY: ${{ secrets.REGISTRY }}

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Test jinja action
uses: cuchi/[email protected]
with:
template: images/packer/image-factory-vm/values.auto.pkrvars.hcl.j2
output_file: images/packer/image-factory-vm/test.auto.pkrvars.hcl
variables: |
location="test"
resource_group="$IMAGE_NAME"
gallery_name="test"
3 changes: 3 additions & 0 deletions images/packer/image-factory-vm/values.auto.pkrvars.hcl.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
location = "{{ location }}"
resource_group = "{{ resource_group }}"
gallery_name = "{{ gallery_name }}"

0 comments on commit 4e5201a

Please sign in to comment.