Skip to content

Commit 481d359

Browse files
authored
Merge pull request #36 from smzelek/main
use typescript for main action file; add option to use local filepaths
2 parents 106ccc8 + 8c79d7a commit 481d359

12 files changed

+7199
-64175
lines changed

.github/workflows/check-dist.yml .github/workflows/check-release-drift.yml

+4-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# `index.js` is the code that will run.
44
# For our project, we generate this file through a build process from other source files.
55
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
6-
name: Check dist/
6+
name: Check release drift
77

88
on:
99
push:
@@ -17,23 +17,19 @@ on:
1717
workflow_dispatch:
1818

1919
jobs:
20-
check-dist:
20+
check-release-drift:
2121
runs-on: ubuntu-latest
2222

2323
steps:
2424
- uses: actions/checkout@v3
25-
26-
- name: Set Node.js 16.x
25+
- name: Set Node.js 16
2726
uses: actions/setup-node@v3
2827
with:
2928
node-version: 16
30-
3129
- name: Install dependencies
3230
run: npm i
33-
3431
- name: Rebuild the dist/ directory
3532
run: npm run prepare
36-
3733
- name: Compare the expected and actual dist/ directories
3834
run: |
3935
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
@@ -42,8 +38,7 @@ jobs:
4238
exit 1
4339
fi
4440
id: diff
45-
46-
# If index.js was different than expected, upload the expected version as an artifact
41+
# If index.js was different than expected, upload the unexpected version as an artifact
4742
- uses: actions/upload-artifact@v2
4843
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
4944
with:

action.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,21 @@ description: "Checks if the PR Title follows contribution guidelines."
33
branding:
44
icon: "tag"
55
color: "purple"
6-
on: [pull_request]
6+
77
inputs:
88
GITHUB_TOKEN:
9+
description: "Override GitHub Token"
910
required: false
11+
use_local_configuration_file:
12+
description: "use a local configuration file rather than pulling one from the repo"
13+
default: "false"
1014
pass_on_octokit_error:
1115
description: "force CI to pass if an octokit error (e.g. missing GITHUB_TOKEN) occurs"
12-
default: false
16+
default: "false"
1317
configuration_path:
1418
description: "config file path"
1519
default: ".github/pr-title-checker-config.json"
20+
1621
runs:
1722
using: "node16"
1823
main: "dist/index.js"

0 commit comments

Comments
 (0)