forked from BYU-Hydroinformatics/Water-Data-Explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (58 loc) · 1.89 KB
/
portal_installations.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
name: tethys-app-installation
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
git-ref:
description: Manual trigger if the tags trigger does not start
required: false
jobs:
app-lint:
runs-on: ubuntu-latest
name: Tethys App Lint
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run tethys-app-linter
uses: tethysapp/tethys-app-linter@v1
flake:
runs-on: ubuntu-latest
name: Flake8
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run flake
uses: tonybajan/[email protected]
with:
select: E,W,F # check for pep8 and pyflakes errors
maxlinelength: 120
repotoken: ${{ secrets.GITHUB_TOKEN }}
deployment:
runs-on: ubuntu-latest
name: Deployment
# needs: app-lint
steps:
- name: Get Variables
id: vars
run: echo ::set-output name=short_ref::${GITHUB_REF##*/}
- name: Deploy Stage
uses: fjogeleit/http-request-action@master
with:
method: 'POST'
url: 'https://multi-tethys.byu.edu/apps/app-store/install/git/'
data: '{"url": "https://github.com/${{ github.repository }}.git", "branch": "${{ steps.vars.outputs.short_ref }}"}'
customHeaders: '{"Authorization": "Token ${{ secrets.MULTI_TETHYS_BYU_AUTH_TOKEN }}"}'
- name: Get Installation ID
id: iid
run: |
echo ${{ steps.deploy.outputs.response }}
echo ::set-output name=IID::${{ fromJson(steps.deploy.outputs.response).install_id }}
- name: Get Installation Status
id: status
uses: msouff/tethys-app-status@v1
with:
url: 'https://multi-tethys.byu.edu/apps/app-store/install/git/status/'
install_id: '${{ steps.iid.outputs.IID }}'
tethys_auth_token: '${{ secrets.MULTI_TETHYS_BYU_AUTH_TOKEN }}'