forked from ponces/treble_aosp
-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (56 loc) · 1.62 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
name: Build
on:
workflow_dispatch:
inputs:
build_variant:
description: 'Build variant to test'
default: 'treble_arm64_bgN'
required: false
type: string
push:
branches:
- android-14.0
paths-ignore:
- '.github/**'
- 'config/**'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
runs-on: self-hosted
timeout-minutes: 6000
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Build Variant
run: echo "BUILD_VARIANT=${{ inputs.build_variant || 'treble_arm64_bgN' }}" >> $GITHUB_ENV
- name: Build Image
run: docker build -f build/Dockerfile -t imbroglius/treble .
- name: Get Keys
uses: actions/checkout@v4
with:
repository: imbroglius/vendor_daniel-priv
token: ${{ secrets.IMBROGLIOTOKEN }}
path: vendor_daniel-priv
- name: Build ROM
run: |
mkdir builds
docker run --rm \
--privileged \
--name test \
--volume ${{ github.workspace }}/builds:/root/builds \
--volume ${{ github.workspace }}/vendor_daniel-priv:/aosp/vendor/daniel-priv \
imbroglius/treble treblebuild ${{ env.BUILD_VARIANT }}
- name: Upload ROM
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_VARIANT }}
path: builds/*.xz
cleanup:
needs: build
runs-on: self-hosted
if: ${{ always() }}
steps:
- name: Cleanup
run: docker stop test || true