Merge pull request #34 from axellotl22/dev-ag #29
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: build and deploy - beta | |
on: | |
push: | |
branches: | |
- 'beta' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- uses: 'actions/checkout@v3' | |
- id: 'auth' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
credentials_json: '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}' | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v1' | |
- name: build and push the docker image | |
env: | |
GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} | |
run: | | |
gcloud auth configure-docker europe-west4-docker.pkg.dev | |
docker build -t europe-west4-docker.pkg.dev/${GOOGLE_PROJECT}/progback-beta/app:latest --build-arg DEV_MODE=False . | |
docker push europe-west4-docker.pkg.dev/${GOOGLE_PROJECT}/progback-beta/app:latest | |
gcloud run services update beta --image europe-west4-docker.pkg.dev/${GOOGLE_PROJECT}/progback-beta/app:latest --region europe-west4 |