-
Notifications
You must be signed in to change notification settings - Fork 4
99 lines (94 loc) · 2.99 KB
/
pr-build.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: PR Build
on:
pull_request:
branches:
- main
env:
BAL_VERSION: 2201.3.1
jobs:
pr-build-on-dev-central:
name: Build PR using Dev Central
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Ballerina
run: |
BAL_INSTALLER=ballerina-$BAL_VERSION-swan-lake-linux-x64.deb
wget https://dist.ballerina.io/downloads/$BAL_VERSION/$BAL_INSTALLER
sudo dpkg -i $BAL_INSTALLER
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python Dependencies
run: |
pip install toml
pip install semantic-version
pip install gitpython
pip install PyGithub
- name: Build Policies
env:
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BAL_DEV_CENTRAL_TOKEN }}
BALLERINA_DEV_CENTRAL: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python build.py build
pr-build-on-stage-central:
name: Build PR using Stage Central
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Ballerina
run: |
BAL_INSTALLER=ballerina-$BAL_VERSION-swan-lake-linux-x64.deb
wget https://dist.ballerina.io/downloads/$BAL_VERSION/$BAL_INSTALLER
sudo dpkg -i $BAL_INSTALLER
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python Dependencies
run: |
pip install toml
pip install semantic-version
pip install gitpython
pip install PyGithub
- name: Build Policies
env:
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BAL_STAGING_CENTRAL_TOKEN }}
BALLERINA_STAGE_CENTRAL: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python build.py build
pr-build-on-prod-central:
name: Build PR using Prod Central
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Ballerina
run: |
BAL_INSTALLER=ballerina-$BAL_VERSION-swan-lake-linux-x64.deb
wget https://dist.ballerina.io/downloads/$BAL_VERSION/$BAL_INSTALLER
sudo dpkg -i $BAL_INSTALLER
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python Dependencies
run: |
pip install toml
pip install semantic-version
pip install gitpython
pip install PyGithub
- name: Build Policies
env:
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BAL_PROD_CENTRAL_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python build.py build