Create Testing-2.yml
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
name: Testing v2
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
MANIFEST_URL:
|
||||
description: 'Manifest'
|
||||
required: true
|
||||
default: ''
|
||||
type: choice
|
||||
options:
|
||||
- https://gitlab.com/OrangeFox/sync.git
|
||||
MANIFEST_BRANCH:
|
||||
description: 'OrangeFox Branch'
|
||||
required: true
|
||||
default: '12.1'
|
||||
type: choice
|
||||
options:
|
||||
- 12.1
|
||||
- 11.0
|
||||
- 10.0
|
||||
- 9.0
|
||||
DEVICE_TREE:
|
||||
description: 'Custom Recovery Tree'
|
||||
required: true
|
||||
default: 'https://github.com/cd-Spidey/custom_recovery_tree_xiaomi_cannong'
|
||||
DEVICE_TREE_BRANCH:
|
||||
description: 'Custom Recovery Tree Branch'
|
||||
required: true
|
||||
default: 'fox_12.1'
|
||||
DEVICE_PATH:
|
||||
description: 'Specify your device path.'
|
||||
required: true
|
||||
default: 'device/xiaomi/cannong'
|
||||
DEVICE_NAME:
|
||||
description: 'Specify your Device Codename.'
|
||||
required: true
|
||||
default: 'cannong'
|
||||
MAKEFILE_NAME:
|
||||
description: 'Specify your twrp/omni_codename'
|
||||
required: true
|
||||
default: 'twrp_cannong'
|
||||
BUILD_TARGET:
|
||||
description: 'Specify your Build Target'
|
||||
required: true
|
||||
default: 'recovery'
|
||||
type: choice
|
||||
options:
|
||||
- boot
|
||||
- recovery
|
||||
- vendor_boot
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check Out
|
||||
uses: actions/checkout@v3.1.0
|
||||
|
||||
- name: Cleanup
|
||||
uses: rokibhasansagar/slimhub_actions@main
|
||||
|
||||
- name: Set Swap Space
|
||||
uses: pierotofy/set-swap-space@master
|
||||
with:
|
||||
swap-size-gb: 10
|
||||
|
||||
- name: Prepare the environment
|
||||
run: |
|
||||
curl -L https://github.com/ghostrider-reborn/scripts/raw/master/script-name.sh | bash
|
||||
|
||||
- name: Install OpenJDK
|
||||
uses: actions/setup-java@v3.5.1
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '8'
|
||||
|
||||
- name: Clone Sync Script
|
||||
run: |
|
||||
mkdir OrangeFox
|
||||
cd OrangeFox
|
||||
echo "workdir=$(pwd)" >> $GITHUB_OUTPUT
|
||||
git config --global user.name "Carlo Dandan"
|
||||
git config --global user.email "jasminecarlo01@gmail.com"
|
||||
git clone https://gitlab.com/OrangeFox/sync.git
|
||||
id: pwd
|
||||
|
||||
- name: Sync OFRP Sources
|
||||
run: |
|
||||
cd sync
|
||||
./orangefox_sync.sh --branch ${{ github.event.inputs.MANIFEST_BRANCH }} --path ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ github.event.inputs.MANIFEST_BRANCH }}
|
||||
working-directory: OrangeFox
|
||||
continue-on-error: true
|
||||
|
||||
- name: Clone Device Tree
|
||||
run: |
|
||||
cd fox_${{ github.event.inputs.MANIFEST_BRANCH }}
|
||||
git clone ${{ github.event.inputs.DEVICE_TREE }} -b ${{ github.event.inputs.DEVICE_TREE_BRANCH }} ./${{ github.event.inputs.DEVICE_PATH }}
|
||||
working-directory: ${{ steps.pwd.outputs.workdir }}
|
||||
|
||||
- name: Re-Sync Sources
|
||||
run: |
|
||||
cd fox_${{ github.event.inputs.MANIFEST_BRANCH }}/bootable/recovery
|
||||
git pull --recurse-submodules
|
||||
git submodule foreach --recursive git pull origin master
|
||||
working-directory: ${{ steps.pwd.outputs.workdir }}
|
||||
continue-on-error: true
|
||||
|
||||
- name: Building Custom Recovery
|
||||
run: |
|
||||
PATH=~/bin:$PATH
|
||||
cd fox_${{ github.event.inputs.MANIFEST_BRANCH }}
|
||||
source ./build/envsetup.sh
|
||||
m help
|
||||
hmm
|
||||
lunch ${{ github.event.inputs.MAKEFILE_NAME }}-eng && mka adbd ${{ github.event.inputs.BUILD_TARGET }}image
|
||||
echo "Done..."
|
||||
working-directory: ${{ steps.pwd.outputs.workdir }}
|
||||
|
||||
- name: Upload to Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
OrangeFox/fox_${{ github.event.inputs.MANIFEST_BRANCH }}/out/target/product/${{ github.event.inputs.DEVICE_NAME }}/OrangeFox*.img
|
||||
OrangeFox/fox_${{ github.event.inputs.MANIFEST_BRANCH }}/out/target/product/${{ github.event.inputs.DEVICE_NAME }}/OrangeFox*.zip
|
||||
name: Unofficial OrangeFox for ${{ github.event.inputs.DEVICE_NAME }}
|
||||
tag_name: ${{ github.run_id }}
|
||||
body: |
|
||||
Manifest: ${{ github.event.inputs.MANIFEST_URL }} -b ${{ github.event.inputs.MANIFEST_BRANCH }}
|
||||
Device: unofficial-fox_${{ github.event.inputs.MANIFEST_BRANCH }}-${{ github.event.inputs.DEVICE_NAME }}.img
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user