Skip to content

Commit 3cccc05

Browse files
authored
Create pbrp-organization-ci.yml
1 parent 365b30d commit 3cccc05

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed
+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: PBRP Organization CI
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
DEPLOY_TYPE:
6+
description: 'Deploy Type (TEST/BETA/OFFICIAL)'
7+
required: true
8+
default: 'TEST'
9+
ChangeLogs:
10+
description: 'Build ChangeLogs'
11+
required: true
12+
default: 'Sync Latest Source'
13+
14+
env:
15+
BUILD_RELEASE_TYPE: ${{ github.event.inputs.DEPLOY_TYPE }}
16+
CHANGELOG: ${{ github.event.inputs.ChangeLogs }}
17+
BOT_API: ${{ secrets.BOT_API }}
18+
GCF_AUTH_KEY: ${{ secrets.GCF_AUTH_KEY }}
19+
GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
20+
GitHubMail: ${{ secrets.GitHubMail }}
21+
GitHubName: ${{ secrets.GitHubName }}
22+
SFPassword: ${{ secrets.SFPassword }}
23+
SFUserName: ${{ secrets.SFUserName }}
24+
TARGET: "pbrp"
25+
#EXTRA_CMD: "Extra Commands Here"
26+
27+
jobs:
28+
PBRP_CI:
29+
if: "(! contains(toJSON(github.event.commits.*.message), '[skip-ci]'))"
30+
runs-on: ubuntu-20.04
31+
32+
steps:
33+
- name: Auto Adapt Manifest
34+
# /* if your branch name is other than the one which you dispatched workflow from then set it manually in the place of ${GITHUB_REF##*/}" */
35+
run: echo "MANIFEST=https://github.com/PitchBlackRecoveryProject/manifest_pb -b android-12.1" >> $GITHUB_ENV
36+
37+
- name: Export Vars
38+
run: |
39+
if [[ ${BUILD_RELEASE_TYPE} == "TEST" ]]; then echo "TEST_BUILD=true" >> $GITHUB_ENV;fi
40+
if [[ ${BUILD_RELEASE_TYPE} == "BETA" ]]; then echo "BETA_BUILD=true" >> $GITHUB_ENV;fi
41+
if [[ ${BUILD_RELEASE_TYPE} == "OFFICIAL" ]]; then echo "PB_OFFICIAL=true" >> $GITHUB_ENV;fi
42+
43+
- name: Checkout Cleaning Up Runner Repo
44+
uses: actions/checkout@v2
45+
with:
46+
repository: PitchBlackRecoveryProject/Cleaner
47+
ref: main
48+
token: ${{ secrets.GH_BOT_TOKEN }}
49+
path: .github/actions/Cleaner
50+
- name: Cleaning
51+
uses: ./.github/actions/Cleaner
52+
- name: Set Swap Space
53+
uses: pierotofy/set-swap-space@master
54+
with:
55+
swap-size-gb: 12
56+
57+
- name: Checkout Recovery Compiler Repo
58+
uses: actions/checkout@v2
59+
with:
60+
repository: PitchBlackRecoveryProject/Compiler
61+
ref: production
62+
token: ${{ secrets.GH_BOT_TOKEN }}
63+
path: .github/actions/Compiler
64+
- name: Recovery Compilation
65+
uses: ./.github/actions/Compiler
66+
67+
- name: Release Builds
68+
run: |
69+
sudo apt-get update && sudo apt-get install sshpass -y
70+
cd $BuildPath
71+
bash vendor/utils/pb_deploy.sh ${BUILD_RELEASE_TYPE} ${VENDOR} ${CODENAME}

0 commit comments

Comments
 (0)