-
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 1.01 KB
/
replace-keywords.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
name: Replace Keywords with Compliments and Insults
on:
issue_comment:
types: [created, edited]
jobs:
replace-keywords:
if: github.actor != 'github-actions[bot]' # Ensure that the action isn't triggered by the bot itself
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install Node.js dependencies
run: |
npm install
working-directory: ./
- name: Run the Node.js action to replace keywords
id: replace-keywords
uses: ./
with:
comment-body: "${{ github.event.comment.body }}"
- name: Update the Comment
uses: peter-evans/create-or-update-comment@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ github.event.comment.id }}
body: ${{ steps.replace-keywords.outputs.updated-body }}
edit-mode: replace