Skip to content

Commit

Permalink
feat: test webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
OnFireByte committed Aug 15, 2023
1 parent 2dc62c7 commit 8fbb3a5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/webhook-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Dispatched Event Workflow

on:
repository_dispatch:
types:
- bot-webhook

jobs:
run_js_script:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14 # Choose the desired Node.js version

- name: Run JavaScript Script
run: |
echo ${{ toJson(github.event.client_payload.data) }}
# Execute your JavaScript script here
node script/commit.js ${{ toJson(github.event.client_payload.data) }}
6 changes: 6 additions & 0 deletions script/commit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// console.log from command param

const commit = process.argv[2];

console.log("TEST");
console.log(commit);

0 comments on commit 8fbb3a5

Please sign in to comment.