-
Notifications
You must be signed in to change notification settings - Fork 14
52 lines (45 loc) · 1.26 KB
/
build.yaml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build Image
# Controls when the workflow will run
on:
workflow_dispatch:
push:
branches:
- 'main'
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt update
sudo apt install coreutils p7zip-full qemu-user-static
- name: Checkout Project Repository
uses: actions/checkout@v2
with:
path: repository
submodules: true
- name: Build Image
run: |
sudo modprobe loop
cd repository
sudo bash -x ./build_image.sh
- name: Copy output
id: copy
run: |
source repository/OpenMowerOS/src/config
NOW=$(date +"%Y-%m-%d-%H%M")
IMAGE=$NOW-open-mower-os-$DIST_VERSION
cp repository/OpenMowerOS/src/workspace/*.img $IMAGE.img
echo "image=$IMAGE" >> $GITHUB_OUTPUT
- name: Create image zip
run: zip ${{ steps.copy.outputs.image }}.zip ${{ steps.copy.outputs.image }}.img
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Latest Image"
files: |
${{ steps.copy.outputs.image }}.zip