Workflow Functions #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "the name of the plugin" | |
on: | |
workflow_dispatch: | |
inputs: | |
stateId: | |
description: "State Id" | |
eventName: | |
description: "Event Name" | |
eventPayload: | |
description: "Event Payload" | |
settings: | |
description: "Settings" | |
authToken: | |
description: "Auth Token" | |
ref: | |
description: "Ref" | |
jobs: | |
compute: | |
name: "plugin name" | |
runs-on: ubuntu-latest | |
permissions: write-all | |
env: | |
SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} | |
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | |
BOT_MODE: ${{ secrets.BOT_MODE }} | |
BOT_ADMINS: ${{ secrets.BOT_ADMINS }} | |
BOT_WEBHOOK: ${{ secrets.BOT_WEBHOOK }} | |
BOT_WEBHOOK_SECRET: ${{ secrets.BOT_WEBHOOK_SECRET }} | |
TELEGRAM_APP_ID: ${{ secrets.TELEGRAM_APP_ID }} | |
TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }} | |
LOG_LEVEL: ${{ secrets.LOG_LEVEL }} | |
DEBUG: ${{ secrets.DEBUG }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.10.0" | |
- name: install dependencies | |
run: yarn | |
- name: execute directive | |
run: npx tsx ./src/main.ts | |
id: plugin-name | |
env: | |
SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} | |
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | |
BOT_MODE: ${{ secrets.BOT_MODE }} | |
BOT_ADMINS: ${{ secrets.BOT_ADMINS }} | |
BOT_WEBHOOK: ${{ secrets.BOT_WEBHOOK }} | |
BOT_WEBHOOK_SECRET: ${{ secrets.BOT_WEBHOOK_SECRET }} | |
TELEGRAM_APP_ID: ${{ secrets.TELEGRAM_APP_ID }} | |
TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }} | |
LOG_LEVEL: ${{ secrets.LOG_LEVEL }} | |
DEBUG: ${{ secrets.DEBUG }} |