Merge pull request #71 from lsst-epo/develop #2
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
# Builds, pushes, and deploys the Skyviewer API container | |
name: 'Deploy Skyviewer API to Int' | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
build-push-deploy: | |
name: 'Build, Publish, and Deploy' | |
runs-on: ubuntu-latest | |
# Checkout the repository to the GitHub Actions runner | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# gcloud CLI setup | |
- name: Login to GCP | |
uses: google-github-actions/setup-gcloud@v0 | |
with: | |
service_account_key: ${{ secrets.SKYVIEWER_INT_SERVICE_ACCOUNT }} | |
project_id: edc-int-6c5e | |
export_default_credentials: true | |
- name: Get app.yaml | |
run: gcloud secrets versions access latest --secret=skyviewer-api-appyaml > app.yaml | |
- name: Format version name | |
id: version_name | |
run: echo "version_name=$(echo \"${{ github.head_ref }}\" | sed 's/[_.,\/]/-/g' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
- name: Deploy to App Engine | |
run: |- | |
gcloud app deploy app.yaml \ | |
--promote |