Skip to content

DietPi-Software test #31

DietPi-Software test

DietPi-Software test #31

Workflow file for this run

name: DietPi-Software
on:
workflow_dispatch:
inputs:
arch:
description: 'Target architecture'
type: choice
options: ['armv6l', 'armv7l', 'aarch64', 'x86_64', 'riscv64', 'all']
default: all
required: true
dist:
description: 'Target Debian version'
type: choice
options: ['buster', 'bullseye', 'bookworm', 'all']
default: all
required: true
soft:
description: 'Software ID(s) to install (space separated)'
required: true
rpi:
description: 'Fake RPi system on ARM archs'
type: boolean
default: false
branch:
description: 'Change target repo branch (optional)'
owner:
description: 'Change target repo owner (optional)'
concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.arch }}-${{ github.event.inputs.dist }}-${{ github.event.inputs.soft }}
cancel-in-progress: true
permissions: {}
defaults:
run:
#working-directory: /dev/shm # uses too much RAM which can lead to OOM kills
shell: sh
jobs:
prep:
# https://github.com/actions/virtual-environments
runs-on: ubuntu-22.04
steps:
- id: arch
run: |
if [ '${{ github.event.inputs.arch }}' = 'all' ]
then
echo arch='["armv6l", "armv7l", "aarch64", "x86_64", "riscv64"]' >> "$GITHUB_OUTPUT"
else
echo arch='["${{ github.event.inputs.arch }}"]' >> "$GITHUB_OUTPUT"
fi
- id: dist
run: |
if [ '${{ github.event.inputs.dist }}' = 'all' ]
then
echo dist='["buster", "bullseye", "bookworm"]' >> "$GITHUB_OUTPUT"
else
echo dist='["${{ github.event.inputs.dist }}"]' >> "$GITHUB_OUTPUT"
fi
outputs:
arch: ${{ steps.arch.outputs.arch }}
dist: ${{ steps.dist.outputs.dist }}
install:
needs: prep
strategy:
matrix:
arch: ${{ fromJson(needs.prep.outputs.arch) }}
dist: ${{ fromJson(needs.prep.outputs.dist) }}
exclude:
- { arch: riscv64, dist: buster }
- { arch: riscv64, dist: bullseye }
fail-fast: false
name: "${{ matrix.arch }} - ${{ matrix.dist }} - ${{ github.event.inputs.soft }}"
runs-on: ubuntu-22.04
steps:
- name: Install
run: |
owner='${{ github.event.inputs.owner }}'
[ $owner ] || owner=$GITHUB_REPOSITORY_OWNER
branch='${{ github.event.inputs.branch }}'
[ $branch ] || branch=$GITHUB_REF_NAME
sudo systemctl stop ssh mono-xsp4
sudo bash -c "G_GITOWNER=$owner G_GITBRANCH=$branch; $(curl -sSf "https://raw.githubusercontent.com/$owner/DietPi/$branch/.github/workflows/dietpi-software.bash")" -- -a '${{ matrix.arch }}' -d '${{ matrix.dist }}' -s '${{ github.event.inputs.soft }}' -rpi '${{ github.event.inputs.rpi }}'