Github Actions

This commit is contained in:
Thomas Hobson 2021-01-28 13:19:24 +13:00
parent 219364af97
commit 7b3565a067
No known key found for this signature in database
GPG key ID: 9F1FD9D87950DB6F
2 changed files with 51 additions and 5 deletions

38
.github/workflows/lxc-build.yml vendored Normal file
View file

@ -0,0 +1,38 @@
---
name: LXC Build
on:
push:
workflow_dispatch:
jobs:
packer:
runs-on: ubuntu-latest
name: packer
steps:
- name: Checkout Repository
uses: actions/checkout@v2
# validate templates
- name: Validate Container
run: packer validate piston.pkr.hcl
working-directory: container
# build container
- name: Build Artifact
run: packer build -var 'make_threads=32' piston.pkr.hcl
working-directory: container
- name: Rename config
run: mv lxc-config config
working-directory: container
# Upload container
- uses: actions/upload-artifact@v2
with:
name: lxc-container
path: |
container/output-piston-bionic/config
container/output-piston-bionic/rootfs.tar.gz