feat(discord_gcp_alerts): add discord gcp alerts package (#354)

This commit is contained in:
Felix Angelov
2023-04-24 10:36:05 -05:00
committed by GitHub
parent 1dc84429e1
commit ed22a14ffb
19 changed files with 1407 additions and 0 deletions
@@ -0,0 +1,62 @@
name: Deploy Discord GCP Alerts
on:
workflow_dispatch:
push:
branches:
- main
paths:
- .github/workflows/deploy_discord_gcp_alerts.yaml
- "packages/discord_gcp_alerts/**"
env:
PROJECT_ID: code-push-prod
SERVICE: discord-gcp-alerts
REGION: us-central1
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/discord_gcp_alerts
name: ☁️ Discord GCP Alerts
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
View File
@@ -35,6 +35,10 @@ jobs:
- ./.github/workflows/main.yaml
- ./.github/actions/dart_package
- packages/artifact_proxy/**
discord_gcp_alerts:
- ./.github/workflows/main.yaml
- ./.github/actions/dart_package
- packages/discord_gcp_alerts/**
shorebird_cli:
- ./.github/workflows/main.yaml
- ./.github/actions/dart_package