reference.geoconnex.us pygeoapi build #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |