Skip to content

create kernel initrd and squashfs and publish it to github releases #36

create kernel initrd and squashfs and publish it to github releases

create kernel initrd and squashfs and publish it to github releases #36

Workflow file for this run

name: create kernel initrd and squashfs and publish it to github releases
on:
push:
branches: [ nfsroot ]
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '30 11 13 * *'
workflow_call:
jobs:
archive-build-artifacts:
runs-on: ubuntu-latest
steps:
- name: Add fai to ubuntu image
run: |
sudo add-apt-repository -y universe
sudo add-apt-repository -y ppa:fai/ppa
sudo apt-get -q update
sudo apt-get -y install fai-client fai-server debian-archive-keyring debian-keyring ubuntu-keyring
- name: step 2 - Add artifacts to publish to the temp folder
run: |
export DIR=/srv/fai/nfsroot
#export DIR=/srv/fai/nfsroot-`date +"%Y%m%d%H%M%S"`
sudo mkdir -p $DIR /var/www/html
echo $DIR
cd $DIR
pwd
#sudo ln -snf $(basename $PWD) ../nfsroot
sudo mkdir -p /srv/fai/config/class/
sudo fai -Ns git+https://github.com/faiproject/fai-config-nfsroot#nfsroot -c NFSROOT,FULL,AMD64 -u nfsroot -v dirinstall $DIR
sudo mkdir -p ../nfsroot/srv/fai/config/class/
#sudo sed -i '2aset -vx' /usr/sbin/fai-cd
sudo fai-cd -e -M -S -C /etc/fai/ -f /var/www/html/filesystem.squashfs
sudo ln -snf /srv/fai/nfsroot/boot/vmlinuz* /var/www/html/
sudo chmod +r /srv/fai/nfsroot/boot/initrd.img*
sudo ln -snf /srv/fai/nfsroot/boot/initrd.img* /var/www/html/
sudo rm /var/www/html/*.html
- name: Use the Upload Artifact GitHub Action
uses: actions/upload-artifact@v2
with:
path: /var/www/html/*