Skip to content

v1.1.0

v1.1.0 #49

Workflow file for this run

name: cd
on:
release:
types: [published]
workflow_dispatch:
inputs:
run_service_name:
description: 'Cloud Run service name'
required: true
default: 'notify-twitter-test'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
GCP_PROJECT_ID: github-app-notify-twitter
GCP_CLOUDRUN_SERVICE_REGION: europe-west1
GCP_CLOUDRUN_SERVICE_NAME: ${{ github.event.inputs.run_service_name || 'notify-twitter' }}
steps:
- uses: actions/checkout@v4
- name: 'Authenticate with GCP'
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: 'Deploy to GCP'
uses: google-github-actions/deploy-cloudrun@v2
with:
service: ${{ env.GCP_CLOUDRUN_SERVICE_NAME }}
region: ${{ env.GCP_CLOUDRUN_SERVICE_REGION }}
project_id: ${{ env.GCP_PROJECT_ID }}
env_vars: |
NOTIFY_TWITTER_WEBHOOK_SECRET=${{ secrets.NOTIFY_TWITTER_WEBHOOK_SECRET }},
TWITTER_API_KEY=${{ secrets.TWITTER_API_KEY }},
TWITTER_API_SECRET=${{ secrets.TWITTER_API_SECRET }},
TWITTER_ACCESS_TOKEN=${{ secrets.TWITTER_ACCESS_TOKEN }},
TWITTER_ACCESS_TOKEN_SECRET=${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
flags: --allow-unauthenticated
source: .