forked from WLAN-Pi/pi-gen-bookworm
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (61 loc) · 1.75 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build pi-gen image
on:
workflow_dispatch: # Allow manual triggering of the workflow
jobs:
build-image:
runs-on: ubuntu-22.04 # Explicitly specify the Ubuntu version
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
git \
coreutils \
quilt \
parted \
qemu-user-static \
debootstrap \
zerofree \
zip \
dosfstools \
libarchive-tools \
libcap2-bin \
rsync \
grep \
xz-utils \
file \
curl \
cpio \
python3 \
python3-pip \
jq \
binfmt-support \
systemd-container \
arch-test
- name: Grant Execution Permissions
run: chmod +x build.sh
- name: Run Build Script as Root
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
run: |
sudo ./build.sh
- name: Archive and Upload Build Artifacts
if: always()
uses: actions/upload-artifact@v4 # Updated to v4
with:
name: pi-gen-image
path: deploy/
slack-workflow-status:
if: ${{ always() && (github.repository_owner == 'WLAN-Pi') && (! github.event.pull_request.head.repo.fork) }}
name: Post Workflow Status to Slack
needs:
- build-image
runs-on: 'ubuntu-22.04'
steps:
- name: Slack Workflow Notification
uses: Gamesight/slack-workflow-status@master
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}