This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.61 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: ci
on:
push:
# tags:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
jobs:
package-box:
name: Package Vagrant Boxes
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
box:
- fbsd_12
# - fbsd_13
# - fbsd_14
steps:
- name: Install Vagrant and QEMU
run: |
sudo apt-get install -qq -o=Dpkg::Use-Pty=0 moreutils
sudo chronic apt-get install -qq -o=Dpkg::Use-Pty=0 vagrant qemu-system virtualbox qemu libvirt-daemon-system libvirt-clients libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev ruby-libvirt ebtables dnsmasq-base
# - name: Cache Vagrant boxes
# uses: actions/cache@v3
# with:
# path: ~/.vagrant.d
# key: ${{ matrix.box }}-vagrant-20231102-${{ hashFiles('Vagrantfile') }}
# restore-keys: |
# ${{ matrix.box }}-vagrant-20231102-
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up VM
run: |
sudo vagrant plugin install vagrant-disksize
sudo vagrant plugin install vagrant-libvirt
sudo vagrant plugin install vagrant-mutate
sudo vagrant status
sudo vagrant up --provider libvirt ${{ matrix.box }}
- name: Package box
run: |
vagrant package ${{ matrix.box }} --output ${{ matrix.box }}.box
ls -ahl *.box
- name: Publish release
if: "startsWith(github.ref, 'refs/tags/')"
uses: softprops/action-gh-release@v1
with:
files: ${{ matrix.box }}.box