Update OrangeFox-OFRP.yml
This commit is contained in:
parent
131183b469
commit
a90c8d0ee9
25
.github/workflows/OrangeFox-OFRP.yml
vendored
25
.github/workflows/OrangeFox-OFRP.yml
vendored
@ -19,6 +19,14 @@ on:
|
|||||||
description: 'Custom Recovery Tree Branch (use master if default)'
|
description: 'Custom Recovery Tree Branch (use master if default)'
|
||||||
required: true
|
required: true
|
||||||
default: 'your_branch_name'
|
default: 'your_branch_name'
|
||||||
|
DEVICE_NAME:
|
||||||
|
description: 'Specify your Device Codename' # As is, just like your PRODUCT_DEVICE in your device tree.
|
||||||
|
required: true
|
||||||
|
default: '7304X'
|
||||||
|
DEVICE_PATH:
|
||||||
|
description: 'Specify your Device Path (Check the DEVICE_PATH in BoardConfig.mk)' # As is, just like your DEVICE_PATH in your BoardConfig.mk
|
||||||
|
required: true
|
||||||
|
default: 'device/device`s_company/Codename'
|
||||||
BUILD_TARGET:
|
BUILD_TARGET:
|
||||||
description: 'Specify your Build Target'
|
description: 'Specify your Build Target'
|
||||||
required: true
|
required: true
|
||||||
@ -36,6 +44,9 @@ jobs:
|
|||||||
if: github.event.repository.owner.id == github.event.sender.id
|
if: github.event.repository.owner.id == github.event.sender.id
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
ORANGEFOX_ROOT: ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ inputs.MANIFEST_BRANCH }}
|
||||||
|
OUT_DIR: ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ inputs.MANIFEST_BRANCH }}/out/target/product/${{ github.event.inputs.DEVICE_NAME }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
@ -65,11 +76,19 @@ jobs:
|
|||||||
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
|
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
|
||||||
git clone https://gitlab.com/OrangeFox/sync.git
|
git clone https://gitlab.com/OrangeFox/sync.git
|
||||||
cd sync
|
cd sync
|
||||||
./orangefox_sync.sh --branch ${{ inputs.MANIFEST_BRANCH }} --path ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ inputs.MANIFEST_BRANCH }}
|
./orangefox_sync.sh --branch ${{ inputs.MANIFEST_BRANCH }} --path ${{ env.ORANGEFOX_ROOT }}
|
||||||
|
|
||||||
|
- name: Cache ccache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.ccache
|
||||||
|
key: ccache-${{ runner.os }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
ccache-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Clone Device Tree
|
- name: Clone Device Tree
|
||||||
run: |
|
run: |
|
||||||
cd ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ inputs.MANIFEST_BRANCH }}
|
cd ${{ env.ORANGEFOX_ROOT }}
|
||||||
git clone ${{ inputs.DEVICE_TREE }} -b ${{ inputs.DEVICE_TREE_BRANCH }} ./${{ github.event.inputs.DEVICE_PATH }}
|
git clone ${{ inputs.DEVICE_TREE }} -b ${{ inputs.DEVICE_TREE_BRANCH }} ./${{ github.event.inputs.DEVICE_PATH }}
|
||||||
cd ${{ github.event.inputs.DEVICE_PATH }}
|
cd ${{ github.event.inputs.DEVICE_PATH }}
|
||||||
echo "COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
echo "COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||||
@ -97,7 +116,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Check if Recovery Exist
|
- name: Check if Recovery Exist
|
||||||
run: |
|
run: |
|
||||||
cd ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ inputs.MANIFEST_BRANCH }}
|
cd ${{ env.ORANGEFOX_ROOT }}
|
||||||
if [ -f out/target/product/${{ env.DEVICE_NAME }}/OrangeFox*.img ]; then
|
if [ -f out/target/product/${{ env.DEVICE_NAME }}/OrangeFox*.img ]; then
|
||||||
echo "CHECK_IMG_IS_OK=true" >> $GITHUB_ENV
|
echo "CHECK_IMG_IS_OK=true" >> $GITHUB_ENV
|
||||||
echo "MD5_IMG=$(md5sum out/target/product/${{ env.DEVICE_NAME }}/OrangeFox*.img | cut -d ' ' -f 1)" >> $GITHUB_ENV
|
echo "MD5_IMG=$(md5sum out/target/product/${{ env.DEVICE_NAME }}/OrangeFox*.img | cut -d ' ' -f 1)" >> $GITHUB_ENV
|
||||||
|
Loading…
Reference in New Issue
Block a user