forked from apache/fineract
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (34 loc) · 1.27 KB
/
fineract.dev.yaml
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
# This is the GitHub Action which
# automatically updates https://www.fineract.dev
#
# see https://jira.apache.org/jira/browse/FINERACT-970
# https://github.com/marketplace/actions/setup-gcloud-environment
# and http://blog2.vorburger.ch/2020/05/fineractdev-cicd-from-github-to-google.html
#
# Created by Michael Vorburger.ch for Fineract in May 2020.
#
name: Deploy to https://www.fineract.dev
on:
push:
branches:
- develop
permissions:
contents: read
jobs:
setup-build-deploy:
name: Deploy on Fineract.dev
if: github.repository == 'apache/fineract'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: 'auth'
uses: google-github-actions/auth@v0
with:
credentials_json: '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS}}'
- uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GOOGLE_PROJECT_ID }}
- run: gcloud components install beta
- run: JOBS=$(gcloud beta builds list --ongoing --format="value[terminator=' '](id)") && [ ! -z "$JOBS" ] && echo "Cancelling $JOBS..." && gcloud builds cancel $JOBS --no-user-output-enabled || true
- run: gcloud beta builds triggers list
- run: gcloud beta builds triggers run deploy-demo --branch=master