-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.yml
More file actions
47 lines (44 loc) · 1.72 KB
/
Copy pathmain.yml
File metadata and controls
47 lines (44 loc) · 1.72 KB
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
# Template configuration for Convertigo project CI build on GitHub Actions
# Please consult the GitHub documentation for details about settings
# https://docs.github.com/en/actions
#
# This sample assumes you have declared the following Encrypted Secrets
# https://docs.github.com/en/actions/reference/encrypted-secrets
#
# C8O_SERVER: Convertigo server endpoint, where the built mobile application will connect
# and the backend project will be deployed, like https://<myhost>/convertigo
# C8O_USER: Convertigo server admin or a user with role PROJECTS_CONFIG, used for the deploiment
# C8O_PASSWORD: Convertigo server password for the C8O_USER
#
# Discover all tasks and -Pconvertigo options in your project build.gradle file.
name: Convertigo CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ ci ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0
with:
ssh-key: ${{ secrets.SSH_KEY }}
- name: Setup Java
uses: actions/setup-java@v2.5.0
with:
java-version: '17'
distribution: 'adopt'
- name: Run Convertigo build
env:
C8O_SERVER: ${{ secrets.C8O_SERVER }}
C8O_USER: ${{ secrets.C8O_USER }}
C8O_PASSWORD: ${{ secrets.C8O_PASSWORD }}
run: |
echo "Build the Mobile Application and deploy to $C8O_SERVER" && \
sh gradlew --no-daemon --stacktrace --info deploy \
-Pconvertigo.deploy.server=$C8O_SERVER \
-Pconvertigo.deploy.user=$C8O_USER \
-Pconvertigo.deploy.password=$C8O_PASSWORD \
-Pconvertigo.load.mobileApplicationEndpoint=$C8O_SERVER