forked from antoinemartin/alpine-openstack-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.71 KB
/
ci.yml
File metadata and controls
52 lines (48 loc) · 1.71 KB
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
50
51
52
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch: {}
jobs:
build:
name: Build image
runs-on: ubuntu-latest
steps:
- name: Install qemu-utils
run: |
sudo apt-get update
sudo apt-get install qemu-utils genisoimage
- uses: actions/checkout@v4
- name: Build image
run: |
wget https://raw.githubusercontent.com/alpinelinux/alpine-make-vm-image/v0.12.0/alpine-make-vm-image \
&& echo '75aafcb883155bcaad9ad0dadb3e22e082152c1e alpine-make-vm-image' | sha1sum -c \
|| exit 1
chmod +x ./alpine-make-vm-image
sudo ./alpine-make-vm-image \
--image-format qcow2 \
--image-size 1G \
--repositories-file openstack/repositories \
--packages "$(cat openstack/packages)" \
--script-chroot \
alpine-openstack.qcow2 -- ./openstack/configure.sh
sha256sum alpine-openstack.qcow2 > SHA256SUMS
qemu-img convert alpine-openstack.qcow2 -O vhdx -o subformat=dynamic alpine-openstack.vhdx
- name: Upload QCOW2 root fs artifact
uses: actions/upload-artifact@v3
with:
name: alpine-openstack.qcow2
path: "${{ github.workspace }}/alpine-openstack.qcow2"
- name: Make Development release
uses: "marvinpinto/action-automatic-releases@latest"
if: ${{ github.ref == 'refs/heads/main' }}
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
alpine-openstack.qcow2
SHA256SUMS