feature: implement create/restore backups (#113) #26
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
on: | |
push: | |
branches: | |
- main | |
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.json | |
# build artifact | |
- name: Build Packer image | |
working-directory: infrastructure/packer/ | |
run: packer build -color=false -on-error=abort -var-file ./vars/production.json ./manifests/basic_gameserver.json | |
env: | |
PACKER_LOG: 1h | |
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} |