Skip to content

Merge pull request #564 from volodkindv/554-fix-topics-topic_to_send_… #7

Merge pull request #564 from volodkindv/554-fix-topics-topic_to_send_…

Merge pull request #564 from volodkindv/554-fix-topics-topic_to_send_… #7

name: Deploy-GCF-Manage-Topics
env:
FILE_NAME: manage_topics # UPD HERE!
on:
push:
branches : [main]
paths:
- 'src/_dependencies/*'
- 'src/manage_topics/*' # UPD HERE!
- '.github/workflows/deploy_manage_topics.yml' # UPD HERE!
jobs:
deploy_function:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Make dependencies
run: make dependencies
- 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/${{ env.FILE_NAME }} # name of directory
name: ${{ env.FILE_NAME }} # name of deploying function
runtime: python310
entry_point: main # UPD HERE! main function
region: europe-west3
# timeout: 540 # UPD HERE!
# max_instances: 1 # UPD HERE!
# memory_mb: 8192 # UPD HERE!
event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish
event_trigger_resource: projects/lizaalert-bot-01/topics/topic_for_topic_management # UPD HERE! topic