-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(artifact_proxy): add dev deployment w/engine-patch (#275)
- Loading branch information
Showing
3 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
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@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 }}" |
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