Skip to content

build_ErfanGSIs

build_ErfanGSIs #4

name: build_ErfanGSIs
on:
# release:
# types: [published]
# push:
# branches:
# - master
# paths:
# - '.config'
# schedule:
# - cron: 0 8 * * 5
watch:
types: [started]
env:
ROM_URL: https://www.yhcres.top/d/02-%E6%89%8B%E6%9C%BA%E5%B9%B3%E6%9D%BF/%E8%81%94%E6%83%B3Lenovo%20%E6%8B%AF%E6%95%91%E8%80%85%20ZUK/%E8%81%94%E6%83%B3Z6%E9%9D%92%E6%98%A5%E7%89%88%EF%BC%88Z6Lite%EF%BC%89/%E5%AE%98%E6%94%B9/Z6Lite_ZUI12_Beta1_ByLZY%EF%BC%882020.9.2%EF%BC%89/Z6Lite_ZUI12_Beta1_ByLZY.zip?sign=9trCclS5eRcbJclKQozPeQYMSJGdOaIbp-_eFflQO4U=:0
ROM_NAME: ZUI
BUILD_TYPE: Aonly
TZ: Asia/Shanghai
jobs:
build:
runs-on: ubuntu-20.04
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@master
- name: Initialization environment
run: |
sudo -E apt-get -qq install git wget
- name: Clone ErfanGSI Source Code
run: git clone --recurse-submodules https://github.com/erfanoabdi/ErfanGSIs.git ErfanGSIs
- name: Fix exit
run: |
sed -i 's/\|\| exit 1//g' $GITHUB_WORKSPACE/ErfanGSIs/url2GSI.sh
sed -i 's/exit 1//g' $GITHUB_WORKSPACE/ErfanGSIs/url2GSI.sh
- name: Setting up ErfanGSI requirements
run: |
cd $GITHUB_WORKSPACE/ErfanGSIs
mkdir ./output
sudo bash ./setup.sh
- name: Download Stock Rom & Generate GSI
run: |
cd $GITHUB_WORKSPACE/ErfanGSIs
sudo bash ./url2GSI.sh -c --$BUILD_TYPE $ROM_URL $ROM_NAME
- name: Zip GSI
run: |
cd $GITHUB_WORKSPACE/ErfanGSIs/output
mkdir final
zip -r final/GSI.zip ./*
- name: Upload GSI to WeTransfer
run: |
cd $GITHUB_WORKSPACE/ErfanGSIs/output
curl -sL https://git.io/file-transfer | sh
./transfer gof ./final/GSI.zip