2021-01-28 01:19:24 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
name: LXC Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
packer:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: packer
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-01-28 10:20:08 +01:00
|
|
|
- name: Install Distrobuilder
|
2021-01-28 10:53:54 +01:00
|
|
|
run: |
|
2021-01-28 11:04:52 +01:00
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y golang-go debootstrap rsync gpg squashfs-tools git
|
2021-01-28 10:53:54 +01:00
|
|
|
sudo go get -v -x github.com/lxc/distrobuilder/distrobuilder
|
|
|
|
sudo python3 -m pip install pyyaml
|
2021-01-28 01:19:24 +01:00
|
|
|
# build container
|
|
|
|
- name: Build Artifact
|
2021-01-28 10:53:54 +01:00
|
|
|
run: |
|
|
|
|
python3 configure.py
|
|
|
|
sudo /home/runner/go/bin/distrobuilder build-lxc build.yaml
|
2021-01-28 10:20:08 +01:00
|
|
|
working-directory: container
|
|
|
|
|
2021-01-28 01:54:40 +01:00
|
|
|
- name: chown everything
|
|
|
|
run: |
|
|
|
|
sudo chown -R runner:runner .
|
2021-01-28 01:19:24 +01:00
|
|
|
working-directory: container
|
|
|
|
|
|
|
|
# Upload container
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: lxc-container
|
|
|
|
path: |
|
2021-01-28 10:20:08 +01:00
|
|
|
container/output-piston-bionic/meta.tar.xz
|
|
|
|
container/output-piston-bionic/rootfs.tar.xz
|