-
-
Notifications
You must be signed in to change notification settings - Fork 130
60 lines (50 loc) · 1.65 KB
/
nightly.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
name: Nightly Build
on:
schedule:
# Every day at 1 AM
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
check_date:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- id: should_run
continue-on-error: true
name: Check latest commit is less than a day
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
ubuntu:
runs-on: ubuntu-latest
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Set up the build environment
run: ./skift.sh tools setup && ./skift.sh tools doctor
- name: Download third-party dependencies
run: ./skift.sh model install
- name: Build System Image (efi-x86_64)
run: ./skift.sh image build --format=hdd --props:branch=nightly --dist
- name: Read release.md and use it as a body of new release
id: read_release
run: ./meta/scripts/dump-body.sh meta/release/nightly.md >> $GITHUB_OUTPUT
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: image-efi-x86_64
path: .cutekit/dist/image-efi-x86_64.hdd
if-no-files-found: error