build: automatic deploy to cloud run

This commit is contained in:
Evan Buss
2024-08-11 23:20:56 +00:00
parent 33ab199b21
commit 03664b3f58

View File

@@ -112,3 +112,29 @@ jobs:
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
deploy-demo:
name: Deploy Demo to Cloud Run
runs-on: ubuntu-latest
environment: demo
needs: docker
permissions:
id-token: write
steps:
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@f112390a2df9932162083945e46d439060d66ec2 # v2.1.4
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@f0990588f1e5b5af6827153b93673613abdc6ec7 #v2.1.1
- name: Deploy to Cloud Run
run: |
gcloud run deploy opds-proxy \
--image=evanbuss/opds-proxy:edge \
--platform=managed \
--region=us-central1 \
--allow-unauthenticated