-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use reusable workflows over a GitHub Action (#17)
* Minor improvements to build, fix prettier * Remove github action * Add reusable workflows
- Loading branch information
1 parent
384b1a7
commit 01e2543
Showing
17 changed files
with
1,262 additions
and
1,669 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Check all links in the repository | ||
on: | ||
workflow_call: | ||
inputs: | ||
config: | ||
description: "The path to the link-check config file" | ||
default: "config/link-check/config.yml" | ||
jobs: | ||
run: | ||
name: Link Check All | ||
runs-on: ubuntu-latest | ||
env: | ||
NODE_OPTIONS: '--max-http-header-size=65536' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run Link Check | ||
id: check | ||
run: npx repo-link-check -c ${{ inputs.config }} |
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,56 @@ | ||
name: Check new links against deployment | ||
on: | ||
workflow_call: | ||
inputs: | ||
main: | ||
description: "The main branch of this repository" | ||
default: "main" | ||
jobs: | ||
run: | ||
name: Run | ||
runs-on: ubuntu-latest | ||
if: | ||
github.event.deployment.ref != ${{ inputs.main }} && | ||
github.event.deployment_status.state == 'success' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Run Link Check | ||
id: check | ||
run: | | ||
set +e | ||
body="$( | ||
npx repo-link-check \ | ||
-d ${{ main }} -c config/link-check/config.yml \ | ||
-r ${{ github.event.deployment.payload.web_url }} | ||
)" | ||
body="${body//'%'/'%25'}" | ||
body="${body//$'\n'/'%0A'}" | ||
body="${body//$'\r'/'%0D'}" | ||
echo "::set-output name=report::$body" | ||
exit 0 | ||
- name: Find Current Pull Request | ||
id: findPr | ||
uses: jwalton/[email protected] | ||
|
||
- name: Find Existing Link Check Report Comment | ||
uses: peter-evans/find-comment@v2 | ||
id: findComment | ||
continue-on-error: true | ||
with: | ||
issue-number: ${{ steps.findPr.outputs.pr }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: <h1 id="link-check">Link Check Report</h1> | ||
|
||
- name: Create or update comment | ||
uses: peter-evans/create-or-update-comment@v2 | ||
with: | ||
issue-number: ${{ steps.findPr.outputs.pr }} | ||
comment-id: ${{ steps.findComment.outputs.comment-id }} | ||
body: | | ||
<h1 id="link-check">Link Check Report</h1> | ||
${{ steps.check.outputs.report }} | ||
edit-mode: replace |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.