-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.58 KB
/
build-alpine-netboot-image-zfs.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
name: Build Alpine ZFS Netboot Image
on:
push:
branches:
- main
schedule:
- cron: '0 */1 * * *'
workflow_dispatch:
inputs:
branch:
description: "Optional branch name to checkout"
required: false
default: "main"
jobs:
build-alpine-zfs-netboot-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch || 'main' }}
- name: Build alpine image
run: |
podman run -it --rm -v $(pwd):/root/workdir alpine sh /root/workdir/build-alpine-netboot-zfs.sh
- name: Patch alpine image
run: |
./patch-alpine-netboot-image-with-zfs.sh
- name: Setting up SSH key to publish netboot image
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.BOOT_SERVER_SSH_PRIVATE_KEY }}
- name: scp netboot image to boot server
run: |
scp -o StrictHostKeyChecking=no iso/alpine-zfsnetboot.tar.gz ${{ secrets.BOOT_SERVER_SSH_USERNAME }}@${{ secrets.BOOT_SERVER_IP_ADDRESS }}:${{ secrets.BOOT_SERVER_IMG_DEST_DIR }}
- name: extract netboot image on boot server
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.BOOT_SERVER_SSH_USERNAME }}@${{ secrets.BOOT_SERVER_IP_ADDRESS }} -C 'cd ${{ secrets.BOOT_SERVER_IMG_DEST_DIR }} && tar xvf alpine-zfsnetboot.tar.gz'
- name: Publish alpine netboot image artifact
uses: actions/upload-artifact@v4
with:
name: alpine-zfs-netboot-image
path: iso/alpine-zfsnetboot.tar.gz