-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (28 loc) · 1 KB
/
webhook-commit.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
env:
payload_data: ${{ toJson(github.event.client_payload) }}
run: |
payload_data=$(echo "${{ toJson(github.event.client_payload) }}" | tr -d '\n')
echo $payload_data
# Execute your JavaScript script here
node script/commit.js $payload_data
- name: Commit Files
uses: EndBug/add-and-commit@v7
with:
author_name: GitHub Actions
message: "action: add new package"