Skip to content

Manual trigger debian rootfs setup #79

Manual trigger debian rootfs setup

Manual trigger debian rootfs setup #79

# This is a basic workflow to help you get started with Actions
name: Manual trigger debian rootfs setup
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
arch:
description: "Debian Architecture"
required: true
default: "['amd64']"
repo:
description: "Package Repository"
required: false
default: ""
include:
description: "Include packages"
required: false
default: ""
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
setup:
runs-on: ubuntu-latest
outputs:
archArray: ${{ steps.setVariables.outputs.archArray }}
steps:
- id: setVariables
run: |
echo "archArray=$input" >> $GITHUB_OUTPUT
env:
input: ${{ inputs.arch }}
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: setup
continue-on-error: true
strategy:
matrix:
arch: ${{fromJSON(needs.setup.outputs.archArray)}}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y debootstrap binfmt-support qemu-user-static debian-archive-keyring debian-ports-archive-keyring
sudo modprobe binfmt_misc
#sudo tee /usr/share/keyrings/debian-archive-keyring.gpg
sudo apt-get update
- name: Run setup-debootstrap.sh
run: |
sudo chmod +x setup-debootstrap.sh
sudo bash setup-debootstrap.sh --arch ${{ matrix.arch }} --include ${{ inputs.include }} --repo ${{ inputs.repo }} #${{ github.event.inputs.arch }}
#OUTPUT=$(sudo find "./build/${{ matrix.arch }}" -maxdepth 1 -name "*.tar.gz" | grep -q -H 'debian-rootfs-${{ matrix.arch }}-')
#echo "OUTPUT=$(echo $OUTPUT)" >> $GITHUB_ENV
- name: Upload debian-rootfs
uses: actions/upload-artifact@v4
with:
name: debian-rootfs-${{ matrix.arch }}
path: ./build/${{ matrix.arch }}/*.tar.gz