-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (43 loc) · 1.33 KB
/
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
38
39
40
41
42
43
44
45
46
name: Build Carpenpi image
on:
push:
branches:
- github_actions
tags:
- 'v*'
workflow_dispatch:
release:
types: [publish]
jobs:
build:
runs-on: self-hosted
#runs-on: ubuntu-22.04
steps:
- name: Check out repository code
if: startsWith(github.ref, 'refs/tags/')
uses: actions/checkout@v2
with:
path: checkout
- name: Install Dependencies
if: startsWith(github.ref, 'refs/tags/')
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get -y update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install unzip git wget qemu-system-arm qemu-efi expect vim-tiny fdisk e2fsprogs mtools zip xz-utils libcurl4-openssl-dev
- name: Build Image
if: startsWith(github.ref, 'refs/tags/')
env:
GIT_TAG: ${GITHUB_REF#refs/tags/}
run: |
cd checkout
mkdir output
sudo bash -x build_img/build_img.sh $PWD/output
echo ::set-output name=version::${GIT_TAG}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
#files: checkout/output/release-${steps.prep.outputs.version}.zip
files: |
checkout/output/release.zip
checkout/output/release.z01
checkout/output/img.sha256