Skip to content

Bumped plugin versions #37

Bumped plugin versions

Bumped plugin versions #37

name: 'Deploy to Integration'
on:
push:
branches:
- 'main'
jobs:
build-push-deploy:
name: 'Build and Deploy to Integration'
runs-on: ubuntu-latest
if: ${{ github.event.action != 'closed'}}
# 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 .env
run: gcloud secrets versions access latest --secret=investigations-api-env > .env
- name: Build Container Image
run: docker build -t "gcr.io/edc-int-6c5e/investigations-api:${{ github.sha }}" .
- name: Configure Docker Auth
run: gcloud --quiet auth configure-docker
- name: Push Container Image to GCR
run: docker push gcr.io/edc-int-6c5e/investigations-api:${{ github.sha }}
- name: Get app.yaml
run: gcloud secrets versions access latest --secret=investigations-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
env:
BRANCH_NAME: ${{ env.version_name }}
run: |
gcloud app deploy app.yaml \
--quiet \
--image-url=gcr.io/edc-int-6c5e/investigations-api:${{ github.sha }} \
--promote \
--project=edc-int-6c5e