Files
shorebird/.github/workflows/deploy_artifact_proxy_prod.yaml
T
dependabot[bot] 22a02c068f chore(deps): bump google-github-actions/deploy-cloudrun from 2.3.0 to 2.4.0 in the gh-deps group (#1950)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 10:43:55 -05:00

59 lines
1.5 KiB
YAML

name: Deploy Artifact Proxy Prod
on:
workflow_dispatch:
env:
PROJECT_ID: code-push-prod
SERVICE: artifact-proxy
REGION: us-central1
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/artifact_proxy
name: ☁️ Artifact Proxy
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- uses: dart-lang/setup-dart@v1
- name: GCloud Auth
uses: "google-github-actions/auth@v2"
with:
project_id: ${{ env.PROJECT_ID }}
credentials_json: ${{ secrets.CLOUD_RUN_SA_PROD }}
export_environment_variables: true
- name: Setup Cloud SDK
uses: google-github-actions/setup-gcloud@v2.1.0
with:
project_id: ${{ env.PROJECT_ID }}
- name: Authorize Docker Push
run: gcloud auth configure-docker
- name: Build and Push Container
run: |-
docker build -t gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }} .
docker push gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }}
- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v2.4.0
with:
service: ${{ env.SERVICE }}
image: gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }}
region: ${{ env.REGION }}
- name: Show Output
run: echo ${{ steps.deploy.outputs.url }}