Update nextjs confign build id (#299) #69
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: 'Deploy to Int' | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build-push-deploy: | |
name: 'Build and Deploy to Integration' | |
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: Build Container Image | |
run: |- | |
docker build \ | |
-t "gcr.io/edc-int-6c5e/investigations-client:${{ github.sha }}" \ | |
--build-arg NEXT_PUBLIC_API_URL=https://int-api-investigations.rubinobs.dev/api \ | |
--build-arg NEXT_PUBLIC_BASE_URL=https://int-investigations.rubinobs.dev \ | |
--build-arg NEXT_PUBLIC_GOOGLE_APP_ID=422617727806-n65pgb9sms5at7369dctnkaj5u2jaitp.apps.googleusercontent.com \ | |
--build-arg GOOGLE_APP_SECRET=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 \ | |
--build-arg CRAFT_SECRET_TOKEN=1128f3c472c118caa63 \ | |
--build-arg CRAFT_EDUCATOR_SCHEMA_SECRET_TOKEN=KPYySxz0TZjIPAtNCdnYUkguZz6y6BU- \ | |
--build-arg CRAFT_STUDENT_SCHEMA_SECRET_TOKEN=vPNHdjzu4XwKhiYC0jDrQENzGxb2Ltx3 \ | |
. | |
- 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-client:${{ github.sha }} | |
- name: Get app.yaml | |
run: gcloud secrets versions access latest --secret=investigations-client-appyaml > app.yaml | |
- name: Deploy to App Engine | |
run: |- | |
gcloud app deploy app.yaml \ | |
--quiet \ | |
--image-url=gcr.io/edc-int-6c5e/investigations-client:${{ github.sha }} \ | |
--promote \ | |
--project=edc-int-6c5e |