forked from nikhiljha/pp-fedora-sdsetup
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (61 loc) · 1.64 KB
/
test.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
name: Run build
"on":
push:
paths-ignored:
- README.md
- COPYING
pull_request:
release:
types:
- published
- prereleased
workflow_dispatch: # Allows manually triggering
env:
PP_IMAGE: /dev/loop10
FED_IMAGE: /dev/loop11
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Makes extra disk space
uses: nikhiljha/make-space@v1
- name: Install necessary tools
run: |
sudo apt update
sudo apt install -yy systemd-container qemu-user-static u-boot-tools btrfs-progs dosfstools xz-utils sssd
sudo service sssd start
- name: Download files
run: |
set -ex -o pipefail
./download-files.sh
- name: Execute build
run: |
set -ex -o pipefail
sudo -E ./all.sh
# Compress image
sudo xz -T 0 fedora.img
- name: Store fedora.img.xz as an artifact
uses: actions/upload-artifact@v4
with:
name: image
path: fedora.img.xz
if-no-files-found: error
release:
needs:
- build # Can only run after the build has created the artifact
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Download fedora.img.xz
uses: actions/download-artifact@v4
with:
name: image
- name: Upload files to release
uses: nikhiljha/release-action@v1
with:
artifacts: fedora.img.xz
allowUpdates: true
name: ${{ github.event.name }}
token: ${{ secrets.GITHUB_TOKEN }}