mirror of
https://github.com/ponces/treble_aosp.git
synced 2025-02-07 11:19:40 +00:00
56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
name: Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
build_variant:
|
|
description: 'Build variant to test'
|
|
default: 'treble_arm64_bgN'
|
|
required: false
|
|
type: string
|
|
# push:
|
|
# branches:
|
|
# - android-15.0
|
|
# paths-ignore:
|
|
# - '.github/**'
|
|
# - 'config/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- uses: webfactory/ssh-agent@v0.9.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.VENDOR_PONCES_PRIV_KEY }}
|
|
|
|
- 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 ponces/treble .
|
|
|
|
- name: Build ROM
|
|
run: |
|
|
mkdir builds
|
|
ssh-keyscan github.com > known_hosts
|
|
docker run --rm \
|
|
--privileged \
|
|
--name test \
|
|
--env SSH_AUTH_SOCK=/ssh-agent \
|
|
--volume $SSH_AUTH_SOCK:/ssh-agent \
|
|
--volume ${{ github.workspace }}/known_hosts:/root/.ssh/known_hosts \
|
|
--volume ${{ github.workspace }}/builds:/root/builds \
|
|
ponces/treble treblebuild ${{ env.BUILD_VARIANT }}
|
|
|
|
- name: Upload ROM
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ env.BUILD_VARIANT }}
|
|
path: builds/*.xz
|