#14 place ssh_private_key_server_bootstrap and server_bootstrap_publi… #79
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: Build Alpine ZFS Netboot Image | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-alpine-zfs-netboot-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- 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/ssh-agent@v0.8.0 | |
with: | |
ssh-private-key: ${{ secrets.BOOT_SERVER_SSH_PRIVATE_KEY }} | |
- name: scp netboot image to boot server | |
run: | | |
scp -o StrictHostKeyChecking=no iso/boot/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@v3 | |
with: | |
name: alpine-zfs-netboot-image | |
path: iso/* |