-
-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GitHub actions to work a little better
- Loading branch information
1 parent
9e096f3
commit 471d71c
Showing
9 changed files
with
102 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Run npm task | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
task: | ||
type: string | ||
required: true | ||
node-version: | ||
type: number | ||
default: 20 | ||
continue-on-error: | ||
type: boolean | ||
default: false | ||
|
||
permissions: | ||
contents: read | ||
|
||
# This uses actions/checkout instead of `git clone` directly since it's way | ||
# easier than parsing everything out. | ||
|
||
jobs: | ||
run-task: | ||
name: npm run ${{ inputs.task }} | ||
continue-on-error: ${{ inputs.continue-on-error }} | ||
runs-on: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
- run: npm ci | ||
- run: npm run ${{ inputs.task }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Post comment | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
url: | ||
type: string | ||
required: true | ||
message: | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: gh issue comment "$ISSUE_URL" --body "$MESSAGE" | ||
env: | ||
ISSUE_URL: ${{ inputs.url }} | ||
MESSAGE: ${{ inputs.message }} | ||
GITHUB_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
name: Ping triage on issue create | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
permissions: | ||
issues: write | ||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: gh issue comment ${{ github.event.issue.url }} --body '@MithrilJS/triage Please take a look.' | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
uses: ./.github/workflows/_post-comment.yml | ||
with: | ||
url: ${{ github.event.issue.url }} | ||
message: '@MithrilJS/triage Please take a look.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters