Skip to content

Commit 049676b

Browse files
committed
fixup! fixup! fixup! ci(comment): make workflow reusable
1 parent 749bb84 commit 049676b

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/actions/comment/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
name: "comment"
33
description: "Comment on a given pull request or issue"
4+
inputs:
5+
token:
6+
description: "A token with pull request or issue write permission"
7+
required: true
48

59
runs:
610
using: "composite"
@@ -9,7 +13,7 @@ runs:
913
uses: actions/github-script@v7
1014
if: ${{ github.event.workflow_run.event == 'pull_request' }}
1115
with:
12-
github-token: ${{ secrets.GITHUB_TOKEN }}
16+
github-token: ${{ inputs.token }}
1317
script: |
1418
var fs = require('fs');
1519
var issue_number = Number(fs.readFileSync('./results/id'));

.github/workflows/check-files.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,5 @@ jobs:
7373
- name: Comment
7474
uses: ./.github/actions/comment
7575
if: always()
76+
with:
77+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)