Skip to content

Commit bd49c04

Browse files
committed
Add CI workflow
1 parent 517a66a commit bd49c04

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

.github/workflows/deploy-ycf.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Push and Deploy Serverless function
2+
on:
3+
push:
4+
paths:
5+
- 'src/**'
6+
- 'terraform/metadata.yml'
7+
- 'requirements.txt'
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: goodsmileduck/yandex-serverless-action@v2
15+
with:
16+
token: ${{ secrets.YC_OAUTH_TOKEN }}
17+
function_id: ${{ vars.YC_FUNCTION_ID }}
18+
runtime: 'python312'
19+
memory: '256'
20+
execution_timeout: '180'
21+
service_account: ${{ secrets.YC_SA_ID }}
22+
entrypoint: 'src.main.telegram_webhook'
23+
environment: TELEGRAM_BOT_TOKEN=${{ secrets.TELEGRAM_BOT_TOKEN }},YC_FOLDER_ID=${{ vars.YC_FOLDER_ID }},TELEGRAM_CHAT_WHITELIST=${{ vars.TELEGRAM_CHAT_WHITELIST }}
24+
source: '.'
25+
exclude: 'terraform/,.github/,README.md'

.github/workflows/terraform-webhook.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
TF_IN_AUTOMATION: "true"
1515
TF_INPUT: "false"
1616
TF_VAR_iam_token: ${{ secrets.YC_IAM_TOKEN }}
17-
TF_VAR_cloud_id: ${{ secrets.YC_CLOUD_ID }}
18-
TF_VAR_folder_id: ${{ secrets.YC_FOLDER_ID }}
17+
TF_VAR_cloud_id: ${{ vars.YC_CLOUD_ID }}
18+
TF_VAR_folder_id: ${{ vars.YC_FOLDER_ID }}
1919
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
2020
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2121
steps:
File renamed without changes.

0 commit comments

Comments
 (0)