forked from RPi-Distro/pi-gen
-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (31 loc) · 966 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Build DuetPi
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get install -y qemu-user-static
- name: Build image
run: |
sudo ./build-docker.sh
- name: Get image date
run: |
IMG_NAME=(deploy/image_*-DuetPi.zip)
if [[ $IMG_NAME =~ ^deploy/image_(.*)-DuetPi.zip$ ]]; then
echo "IMG_DATE=${BASH_REMATCH[1]}" >> $GITHUB_ENV
else
echo "Error: Image not found!"
exit 1
fi
- name: Make new release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "bookworm-${{ env.IMG_DATE }}"
prerelease: true
title: "DuetPi ${{ env.IMG_DATE }} (bookworm)"
files: deploy/image_*.zip