This repository has been archived by the owner on May 2, 2024. It is now read-only.
forked from nitin1438/android_build_scripts
-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (52 loc) · 1.77 KB
/
main.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
name: RisingOS GSI
on:
workflow_dispatch:
jobs:
test:
name: Build GSIs using foss.crave.io
runs-on: self-hosted
steps:
- name: Cleanup
run: rm -rf *
- name: Create workspace
run: mkdir gsi
continue-on-error: true
- name: Enter Workspace
run: cd gsi
continue-on-error: true
# Check-out in order to access the repository's files.
- name: Check-out to repository
uses: actions/checkout@v4
- name: Test Local Manifests
run: |
repo init -u https://github.com/RisingTechOSS/android -b fourteen --git-lfs
git clone https://github.com/OkBuddyGSI/treble_manifest.git --depth 1 -b 14 .repo/local_manifests && \
timeout 1m repo sync --force-sync || { exit_code=$?; [ $exit_code -eq 124 ] || (echo "Error: Process failed with exit code $exit_code"; exit $exit_code); }
rm -rf .repo
timeout-minutes: 10
- name: Exports
run: |
export BUILD_HOSTNAME=crave
export BUILD_USERNAME=OkBuddyGSI
- name: Run Script
run: bash build.sh
# Only reach this when the user killed the workflow.
- name: Execute if the job is cancelled
if: ${{ cancelled() }}
run: crave stop --all
- name: Find output file
run: |
mv */system.img RisingOS-Generic-$(date +%Y%m%d)-OkBuddyGSI-EXPERIMENTATIONS.img
mv system.img RisingOS-Generic-$(date +%Y%m%d)-OkBuddyGSI-EXPERIMENTATIONS.img
xz -z -k RisingOS*.img
- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: |
*.img.xz
name: RisingOS-${{ github.run_id }}
tag_name: ${{ github.run_id }}
body: |
Target: RisingOS-Generic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}