Update features.config.yml (#19) #15
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: features.geoconnex.dev pygeoapi build | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "pygeoapi/**" | |
env: | |
REGISTRY: reference-features | |
DATABASE: hosted-features | |
DBUSER: root | |
jobs: | |
upload-file: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Generate sql data | |
uses: cgs-earth/[email protected] | |
with: | |
username: ${{ secrets.HYDRO_USERNAME }} | |
password: ${{ secrets.HYDRO_PASSWORD }} | |
db: ${{ env.DATABASE }} | |
dbuser: ${{ env.DBUSER }} | |
resource: 495b65e56e994289baaa5feeb401358e | |
- name: Set up Cloud SDK | |
uses: "google-github-actions/auth@v2" | |
with: | |
credentials_json: ${{ secrets.GCP_SA_TOKEN }} | |
- name: Upload backup to GCP Bucket | |
id: upload-files | |
uses: google-github-actions/upload-cloud-storage@v2 | |
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 }} |