forked from tobyhs/codemention
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
33 lines (31 loc) · 1.05 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
name: codemention
description: Mentions people who subscribe to file changes on pull requests
author: Toby Hsieh
inputs:
githubToken:
required: true
description: GitHub API token
runs:
using: composite
steps:
# We need to copy codemention's package-lock.json into the workspace
# because hashFiles only works on files inside the workspace.
- run: cp ${{ github.action_path }}/package-lock.json codemention-package-lock.json
shell: bash
- uses: actions/cache@v4
id: cache-node-modules
with:
path: ${{ github.action_path }}/node_modules
key: codemention-npm-${{ hashFiles('codemention-package-lock.json') }}
- run: npm install
working-directory: ${{ github.action_path }}
shell: bash
if: steps.cache-node-modules.outputs.cache-hit != 'true'
- run: npm run build
working-directory: ${{ github.action_path }}
shell: bash
- run: node run.js
working-directory: ${{ github.action_path }}
shell: bash
env:
INPUT_GITHUBTOKEN: "${{ inputs.githubToken }}"