-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (45 loc) · 1.54 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
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
IPXE_ROMS: "https://nexus.fp.unstable.life/repository/flashpoint-dependency-software/QEMU-Roms/qemu-ipxe.zip"
QEMU_EXTRA_ARGS: "-machine pc-i440fx-5.2"
steps:
- uses: actions/[email protected]
- name: Prepare
id: prepare
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo add-apt-repository ppa:canonical-server/server-backports \
&& sudo apt-get update \
&& sudo apt-get -y install qemu-utils qemu-system-x86
- name: Install pinned iPXE roms
run: wget -O/tmp/roms.zip "$IPXE_ROMS" && sudo unzip -o /tmp/roms.zip -d /usr/lib/ipxe/qemu
- name: Build image
run: sudo make
- name: Take snapshot
run: ./snapshot.sh
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.prepare.outputs.sha_short }}
release_name: ${{ steps.prepare.outputs.sha_short }}
draft: false
prerelease: false
- name: Upload release
id: upload_release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./alpine.qcow2
asset_name: alpine.qcow2
asset_content_type: application/octet-stream