mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-25 20:33:35 +00:00
Github action to create a raspberry pi image (#302)
Co-authored-by: Tony Kuker <akuker@gmail.com>
This commit is contained in:
parent
c3aede9873
commit
95607cd603
69
.github/workflows/rpi_image_creation.yml
vendored
Normal file
69
.github/workflows/rpi_image_creation.yml
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
name: Generate a RaSCSI OS image, based upon the official Rapsberry Pi OS
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the rpi_image_creation branch
|
||||
push:
|
||||
branches: [ rpi_image_creation, develop, master ]
|
||||
pull_request:
|
||||
branches: [ rpi_image_creation, develop, master ]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
# TODO: I don't think this step is needed....
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Checkout RaSCSI
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: RASCSI
|
||||
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Checkout RaSCSI
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: akuker/pi-gen
|
||||
path: pi-gen
|
||||
|
||||
- name: Install Raspberry Pi build toolchain
|
||||
run: sudo apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc qemu-utils kpartx
|
||||
|
||||
- name: Configure the build
|
||||
run: |
|
||||
echo -----------------------------------------------------
|
||||
echo "IMG_NAME=RaSCSI-$GITHUB_RUN_ID" > config
|
||||
echo "TARGET_HOSTNAME=rascsi" >> config
|
||||
echo "ENABLE_SSH=1" >> config
|
||||
echo "LOCALE_DEFAULT=en_US.UTF-8" >> config
|
||||
echo "KEYBOARD_KEYMAP=us" >> config
|
||||
echo "KEYBOARD_LAYOUT=\"English (US)\"" >> config
|
||||
echo -----------------------------------------------------
|
||||
cat config
|
||||
working-directory: pi-gen
|
||||
|
||||
- name: Run the Raspberry Pi build generation tool
|
||||
run: sudo ./build.sh
|
||||
working-directory: pi-gen
|
||||
|
||||
- name: List the files in the deploy directory
|
||||
run: |
|
||||
echo -----------------------------------------------------
|
||||
ls -alh pi-gen/deploy/
|
||||
echo -----------------------------------------------------
|
||||
|
||||
- name: Archive the build artifacts
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
# Artifact name
|
||||
name: raspberry-pi-image
|
||||
# A file, directory or wildcard pattern that describes what to upload
|
||||
path: pi-gen/deploy/*
|
Loading…
Reference in New Issue
Block a user