-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
51 lines (47 loc) · 1.55 KB
/
action.yml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "Send File Changes to Lamatic Webhook"
description: "Sends new or modified files to a specified webhook URL."
author: "Lamatic.ai"
branding:
icon: 'zap'
color: 'red'
inputs:
webhook_url:
description: "The URL of the webhook to send data to."
required: true
webhook_key:
description: "The authentication key for the webhook."
required: true
github_ref:
description: "The GitHub reference (branch) to work with."
required: true
file_type:
description: "The type of file to check and send (e.g., mdx, json)."
required: true
mode:
description: "The mode to operate in: 'full-refresh' to send all files, or 'incremental' to send only new/modified files after the first run."
required: true
default: "incremental"
verbose:
description: "Enable verbose output (true or false)."
required: false
default: "false"
runs:
using: "composite"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 2 # Fetch the last 2 commits to compare changes
- name: Make send_changes.sh executable
run: sudo chmod +x ${{ github.action_path }}/send_changes.sh
shell: bash
- name: Run send_changes.sh
run: ${{ github.action_path }}/send_changes.sh
shell: bash
env:
WEBHOOK_URL: ${{ inputs.webhook_url }}
WEBHOOK_KEY: ${{ inputs.webhook_key }}
GITHUB_REF: ${{ inputs.github_ref }}
FILE_TYPE: ${{ inputs.file_type }}
MODE: ${{ inputs.mode }}
VERBOSE: ${{ inputs.verbose }}