-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (44 loc) · 1.27 KB
/
pygeoapi-ci.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
name: reference.geoconnex.us pygeoapi build
on:
push:
branches:
- "main"
paths:
- "pygeoapi.config.yml"
workflow_dispatch:
env:
REGISTRY: reference-features
DATABASE: reference
DBUSER: root
jobs:
upload-file:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Generate sql data
uses: cgs-earth/[email protected]
with:
username: ${{ secrets.HYDRO_USERNAME }}
password: ${{ secrets.HYDRO_PASSWORD }}
dbuser: ${{ env.DBUSER }}
- name: Set up Cloud SDK
uses: "google-github-actions/auth@v1"
with:
credentials_json: ${{ secrets.GCP_SA_TOKEN }}
- name: Upload backup to GCP Bucket
id: upload-files
uses: google-github-actions/upload-cloud-storage@v0
with:
path: .
destination: ${{ env.REGISTRY }}
gzip: false
parent: false
glob: "**/*.sql.gz"
headers: |-
content-type: application/x-gzip
- name: Push to mysql
run: |-
gcloud sql import sql ${{ env.REGISTRY }} gs://${{ env.REGISTRY }}/${{ env.DATABASE }}.sql.gz \
--database=${{ env.DATABASE }} \
--user=${{ env.DBUSER }}