CI: debian: setup image building jobs #7
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: Debian based machines | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
base: | |
name: Base | |
runs-on: [self-hosted, forrest, debian-base] | |
steps: | |
- name: Set up runner machine | |
run: | | |
sudo localectl set-locale en_US.UTF-8 | |
export DEBIAN_FRONTEND=noninteractive | |
export DPKG_FORCE=confnew | |
sudo -E apt-get update | |
sudo -E apt-get --assume-yes dist-upgrade | |
sudo -E apt-get --assume-yes install git | |
sudo -E apt-get --assume-yes autoremove | |
sudo -E apt-get --assume-yes clean | |
- name: Persist the disk image | |
env: | |
PERSISTENCE_TOKEN: ${{ secrets.PERSISTENCE_TOKEN }} | |
if: ${{ env.PERSISTENCE_TOKEN != '' }} | |
run: | | |
sudo fstrim / | |
echo "$PERSISTENCE_TOKEN" > ~/config/persist | |
yocto: | |
name: Yocto | |
needs: base | |
runs-on: [self-hosted, forrest, debian-yocto] | |
steps: | |
- name: Install Software | |
run: | | |
sudo localectl set-locale en_US.UTF-8 | |
export DEBIAN_FRONTEND=noninteractive | |
export DPKG_FORCE=confnew | |
sudo -E apt-get update | |
sudo -E apt-get --assume-yes dist-upgrade | |
sudo -E apt-get --assume-yes install build-essential chrpath diffstat gawk git lz4 | |
sudo -E apt-get --assume-yes autoremove | |
sudo -E apt-get --assume-yes clean | |
- name: Persist the disk image | |
env: | |
PERSISTENCE_TOKEN: ${{ secrets.PERSISTENCE_TOKEN }} | |
if: ${{ env.PERSISTENCE_TOKEN != '' }} | |
run: | | |
sudo fstrim / | |
echo "$PERSISTENCE_TOKEN" > ~/config/persist |