-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (47 loc) · 1.69 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
47
48
49
name: Gladys OS Build
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build
runs-on: ubuntu-20.04
if: "! contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
-
name: Get the version (git tag)
id: get_version
run: |
echo ${GITHUB_REF/refs\/tags\//}
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
-
name: 🖥️ Install pi-gen required dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update --fix-missing
sudo apt-get install -y 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 gpg pigz
-
name: 🍓 Building Raspberry image
run: |
sudo CLEAN=1 BUILD_VERSION=${{ steps.get_version.outputs.VERSION }} ./build.sh -c config
-
name: ✔️ Check prepared images
run: |
ls -al ./deploy
test -f ./deploy/image_gladys-os-rpi.zip
-
name: 🏷️ Rename files for release
run: |
sudo mv ./deploy/gladys-os-rpi.info ./gladys-os-rpi-${{ steps.get_version.outputs.VERSION }}.info
sudo mv ./deploy/image_gladys-os-rpi.zip ./gladys-os-rpi-${{ steps.get_version.outputs.VERSION }}.zip
-
name: 📦 Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
gladys-os-rpi-${{ steps.get_version.outputs.VERSION }}.info
gladys-os-rpi-${{ steps.get_version.outputs.VERSION }}.zip