Skip to content

Merge pull request #553 from volodkindv/552-docker-tests #3

Merge pull request #553 from volodkindv/552-docker-tests

Merge pull request #553 from volodkindv/552-docker-tests #3

name: Deploy-GCF-Send-Notifications-Helper
on:
push:
branches : main
paths:
- 'src/send_notifications_helper/main.py'
- 'src/send_notifications_helper/requirements.txt'
- '.github/workflows/deploy_send_notifications_helper.yml'
jobs:
deploy_function:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Authenticate in GCP
id: auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.gcp_credentials }}
- name: Deploy the CF
id: deploy
uses: google-github-actions/deploy-cloud-functions@v1
with:
source_dir: src/send_notifications_helper # name of directory
name: send_notifications_helper
runtime: python310
entry_point: main
region: europe-west3
timeout: 540
max_instances: 1
memory_mb: 256 # ex value 8192
event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish
event_trigger_resource: projects/lizaalert-bot-01/topics/topic_to_send_notifications_helper