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

View File

@ -141,15 +141,23 @@ cd piston/lxc
#### Installation (simple)
- `cd container && ./install.sh`
- `mkdir -p /var/lib/lxc/piston`
- `cd /var/lib/lxc/piston`
- `wget [latest container url] -o container.zip`
- `unzip container.zip`
- `tar xzf rootfs.tar.gz`
- `rm rootfs.tar.gz container.zip`
- Good to go!
#### Installation (advanced)
- `cd ../container && ./install.sh`
- Wait, it may take up to an hour.
- `cd ../lxc && ./start && cd ..`
- Good to go!
#### Installation (advanced)
- See `var/install.txt` for how to create a new LXC container and install all of the required
software.
Alternatively, see `var/install.txt` for how to build the container manually
#### CLI Usage
- `cli/execute [language] [file path] [args]`