feat: add artifact_proxy server (#222)

This commit is contained in:
Eric Seidel
2023-04-05 20:52:17 -07:00
committed by GitHub
parent efe6477425
commit 378b2df4b3
14 changed files with 798 additions and 2 deletions
@@ -0,0 +1,62 @@
name: Deploy Artifacts Proxy
on:
workflow_dispatch:
push:
branches:
- main
paths:
- .github/workflows/deploy_artifacts_proxy.yaml
- packages/artifacts_proxy/**"
env:
PROJECT_ID: code-push-prod
SERVICE: artifacts-proxy
REGION: us-central1
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/artifacts_proxy
name: ☁️ Artifacts Proxy
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: dart-lang/setup-dart@v1
- name: Setup Cloud SDK
uses: google-github-actions/setup-gcloud@v0.2.0
with:
project_id: ${{ env.PROJECT_ID }}
service_account_key: ${{ secrets.CLOUD_RUN_SA_PROD }}
export_default_credentials: true
- 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@v0.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 }}
- name: Ping
run: curl "${{ steps.deploy.outputs.url }}"
+4 -1
View File
@@ -32,10 +32,13 @@ jobs:
id: needs_dart_build
with:
filters: |
artifacts_proxy:
- ./.github/actions/dart_package
- packages/artifacts_proxy/**
shorebird_cli:
- ./.github/actions/dart_package
- packages/shorebird_cli/**
- packages/shorebird_code_push_client/**
- packages/shorebird_code_push_client/**
shorebird_code_push_client:
- ./.github/actions/dart_package
- packages/shorebird_code_push_client/**