Skip to content

Commit 3bccbb5

Browse files
committed
spes: Add pbrp-organization-ci.yml
1 parent 023db73 commit 3bccbb5

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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: "rm -rf vendor/pb && git clone --depth=1 https://github.com/Agatha-Prjkt/vendor_pb vendor/pb"
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 ${GITHUB_REF##*/}" >> $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+
53+
- name: Checkout Recovery Compiler Repo
54+
uses: actions/checkout@v2
55+
with:
56+
repository: PitchBlackRecoveryProject/Compiler
57+
ref: production
58+
token: ${{ secrets.GH_BOT_TOKEN }}
59+
path: .github/actions/Compiler
60+
- name: Recovery Compilation
61+
uses: ./.github/actions/Compiler
62+
63+
- name: Release Builds
64+
run: |
65+
sudo apt-get update && sudo apt-get install sshpass -y
66+
cd $BuildPath
67+
bash vendor/utils/pb_deploy.sh ${BUILD_RELEASE_TYPE} ${VENDOR} ${CODENAME}

0 commit comments

Comments
 (0)