forked from WillB97/sb-kiosk
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.06 KB
/
build-docker.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
name: Image build
on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build image
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install fdisk gdisk qemu-user-static libarchive-tools tar
- name: Checkout
uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
- name: Build image
run: |
chmod +x ./build.sh
./build.sh
du -h ${{ github.workspace }}/*.img.xz
- name: Get output name
id: git-desc
run: |
echo "git_desc=$(git describe --tags --always)" >> $GITHUB_ENV
echo "image_path=$(realpath ${{ github.workspace }}/*.img.xz)" >> $GITHUB_ENV
echo "image_name=$(basename ${{ github.workspace }}/*.img.xz)" >> $GITHUB_ENV
- name: Save image artifact
uses: actions/upload-artifact@v3
with:
name: kiosk-${{ env.git_desc }}
path: ${{ env.image_path }}