Skip to content

fix ci

fix ci #28

Workflow file for this run

on:
push:
branches:
- main
- fix-ci
paths:
- ".github/workflows/base-image.yml"
- "infrastructure/packer/**/*"
- "infrastructure/ansible/**/*"
name: Base Image
jobs:
build-image:
name: Build Hetzner Image
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
# fix backwards incompatibilities in template
- name: Fix Template
uses: hashicorp/packer-github-actions@master
with:
command: fix
target: infrastructure/packer/manifests/basic_gameserver.json
# validate templates
- name: Validate Template
uses: hashicorp/packer-github-actions@master
with:
command: validate
arguments: -syntax-only
target: infrastructure/packer/manifests/basic_gameserver.pkr.hcl
# build artifact
- name: Build Packer image
working-directory: infrastructure/packer/
run: packer build -color=false -on-error=abort -var-file ./vars/production.hcl ./manifests/basic_gameserver.pkr.hcl
env:
PACKER_LOG: 1h
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}