This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
ci #157
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
tags: | |
schedule: | |
- cron: "0 0 * * 1" | |
workflow_dispatch: | |
jobs: | |
package-box: | |
name: Package Vagrant Boxes | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
box: | |
- fbsd_12 | |
- fbsd_13 | |
- fbsd_14 | |
steps: | |
- name: Display CPU info | |
run: lscpu | |
- 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 | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up VM | |
shell: sudo bash {0} | |
run: | | |
vagrant plugin install vagrant-libvirt | |
vagrant plugin install vagrant-mutate | |
vagrant status | |
vagrant up --provider libvirt ${{ matrix.box }} | |
- name: Package box | |
shell: sudo bash {0} | |
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 |