forked from AmogOS-Rom/android_manifest
-
Notifications
You must be signed in to change notification settings - Fork 50
63 lines (61 loc) · 2.44 KB
/
main.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
name: Test your repo manifest repository
on:
workflow_dispatch:
inputs:
MANIFEST_URL:
description: 'MANIFEST_URL (if want to use SSH keys, use [email protected]:XXXXX)'
required: true
default: 'https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp'
MANIFEST_BRANCH:
description: 'MANIFEST_BRANCH'
required: true
default: 'twrp-12.1'
CHOICE:
type: choice
description: 'ROM or Local Manifest'
options:
- ROM_MANIFEST
- LOCAL_MANIFEST
GIT_USERNAME:
description: 'GIT_USERNAME'
required: true
default: 'sounddrill31'
GIT_EMAIL:
description: 'GIT_EMAIL'
required: true
default: '[email protected]'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install repo tool
run: |
sudo apt-get update
sudo apt-get install -y git-core python3-pip wget
wget https://storage.googleapis.com/git-repo-downloads/repo && sudo mv repo /usr/bin/repo && sudo chmod a+x /usr/bin/repo
- name: Initialize and Sync Repo for ROM Manifest
if: ["${{ github.event.inputs.choice }}" == "ROM_MANIFEST"]
run: |
mkdir workspace
cd workspace
echo "workspace-folder=$(pwd)" >> $GITHUB_OUTPUT
git config --global user.name ${{ github.event.inputs.GIT_USERNAME }}
git config --global user.email ${{ github.event.inputs.GIT_EMAIL }}
repo init --depth=1 -u ${{ github.event.inputs.MANIFEST_URL }} -b ${{ github.event.inputs.MANIFEST_BRANCH }}
timeout 1m repo sync || true
timeout-minutes: 6
- name: Initialize and Sync Repo for Local Manifest
if: ["${{ github.event.inputs.choice }}" == "LOCAL_MANIFEST"]
run: |
mkdir workspace
cd workspace
echo "workspace-folder=$(pwd)" >> $GITHUB_OUTPUT
git config --global user.name ${{ github.event.inputs.GIT_USERNAME }}
git config --global user.email ${{ github.event.inputs.GIT_EMAIL }}
git clone ${{ github.event.inputs.MANIFEST_URL }} -b ${{ github.event.inputs.MANIFEST_BRANCH }} .repo/local_manifests
repo init --depth=1 -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp -b twrp-12.1
timeout 1m repo sync || true
timeout-minutes: 6
id: pwd