42 lines
1.0 KiB
YAML
42 lines
1.0 KiB
YAML
---
|
|
|
|
name: LXC Build
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
packer:
|
|
runs-on: ubuntu-latest
|
|
name: packer
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Distrobuilder
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y golang-go debootstrap rsync gpg squashfs-tools git
|
|
sudo go get -v -x github.com/lxc/distrobuilder/distrobuilder
|
|
sudo python3 -m pip install pyyaml
|
|
# build container
|
|
- name: Build Artifact
|
|
run: |
|
|
python3 configure.py
|
|
sudo /home/runner/go/bin/distrobuilder build-lxc build.yaml
|
|
working-directory: container
|
|
|
|
- name: chown everything
|
|
run: |
|
|
sudo chown -R runner:runner .
|
|
working-directory: container
|
|
|
|
# Upload container
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: lxc-container
|
|
path: |
|
|
container/output-piston-bionic/meta.tar.xz
|
|
container/output-piston-bionic/rootfs.tar.xz |