Skip to content

chore(deps): bump test from 1.25.8 to 1.25.9 in /packages/discord_gcp… #55

chore(deps): bump test from 1.25.8 to 1.25.9 in /packages/discord_gcp…

chore(deps): bump test from 1.25.8 to 1.25.9 in /packages/discord_gcp… #55

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
CONTAINER_REGISTRY: us-docker.pkg.dev
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@v4
with:
submodules: recursive
- name: 🎯 Setup Dart
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 GCloud SDK
uses: google-github-actions/[email protected]
with:
project_id: ${{ env.PROJECT_ID }}
- name: 🔓 Login to Artifact Registry
uses: docker/login-action@v3
with:
registry: ${{ env.CONTAINER_REGISTRY }}
username: _json_key
password: ${{ secrets.CLOUD_RUN_SA_PROD }}
- name: 🐳 Build and Push Container
run: |-
docker build -t ${{ env.CONTAINER_REGISTRY }}/${{ env.PROJECT_ID }}/us.gcr.io/${{ env.SERVICE }}:${{ github.sha }} .
docker push ${{ env.CONTAINER_REGISTRY }}/${{ env.PROJECT_ID }}/us.gcr.io/${{ env.SERVICE }}:${{ github.sha }}
- name: 🚀 Deploy to Cloud Run
id: deploy
uses: google-github-actions/[email protected]
with:
service: ${{ env.SERVICE }}
image: ${{ env.CONTAINER_REGISTRY }}/${{ env.PROJECT_ID }}/us.gcr.io/${{ env.SERVICE }}:${{ github.sha }}
region: ${{ env.REGION }}
- name: 👀 Show Output
run: echo ${{ steps.deploy.outputs.url }}
- name: 🏓 Ping
run: curl "${{ steps.deploy.outputs.url }}"