Skip to content

fix: build the action with rollup #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
commitlint.config.cjs
commitlint.config.js
action.yml
.github
CHANGELOG.md
Expand Down
8 changes: 1 addition & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
"no-process-exit": "off",
"node/no-unpublished-require": "off",
"node/no-unpublished-import": "off",
"node/no-unsupported-features/es-syntax": "off",
"import/extensions": [
"error",
{
"js": "always"
}
]
"node/no-unsupported-features/es-syntax": "off"
}
}
File renamed without changes.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ typings/

# next.js build output
.next

# Dist files
dist
File renamed without changes.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
16.5.0
2 changes: 1 addition & 1 deletion .versionrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"package-lock.json",
{
"filename": "action.yml",
"updater": "./.github/tasks/actionYamlUpdater.cjs"
"updater": "./.github/tasks/actionYamlUpdater.js"
}
],
"releaseCommitMessageFormat": "chore(release): publish {{currentTag}} [skip-ci]"
Expand Down
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ All notable changes to this project will be documented in this file. See [standa

* Node.js version used on the action updated from 12 to
16
* Config files now need to be renamed from .js to .cjs

### Features

Expand Down
16 changes: 14 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
FROM node:16-alpine3.13
FROM node:16.5.0-alpine3.14 as build

COPY package*.json /

RUN npm ci --ignore-scripts

COPY . .

RUN npm run build

FROM node:16.5.0-alpine3.14

RUN apk --no-cache add git

COPY --from=build dist/run.js /run.js

COPY package*.json /

RUN npm ci --production --ignore-scripts

COPY . .
COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can supply these inputs to the `wagoid/commitlint-github-action@v3` step.

The path to your commitlint config file.

Default: `commitlint.config.cjs`
Default: `commitlint.config.js`

If the config file doesn't exist, [config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) settings will be loaded as a default fallback.

Expand Down
9 changes: 5 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ description: Lints Pull Request commit messages with commitlint
author: Wagner Santos
inputs:
configFile:
description: Commitlint config file. If the file doesn't exist, config-conventional settings will be
description:
Commitlint config file. If the file doesn't exist, config-conventional settings will be
loaded as a fallback.
default: ./commitlint.config.cjs
default: ./commitlint.config.js
required: false
firstParent:
description: >
When set to true, we follow only the first parent commit when seeing a merge commit. More info
in git-log docs https://git-scm.com/docs/git-log#Documentation/git-log.txt---first-parent
default: "true"
default: 'true'
required: false
failOnWarnings:
description: Whether you want to fail on warnings or not
default: "false"
default: 'false'
required: false
helpURL:
description: Link to a page explaining your commit message convention
Expand Down
6 changes: 6 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [["@babel/preset-env"]],
"targets": {
"node": "16.5.0"
}
}
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
export default {
module.exports = {
// Automatically clear mock calls and instances between every test
// preset: 'rollup-jest',
clearMocks: true,
testEnvironment: '@commitlint/test-environment',
transform: {},
transform: {
'\\.[jt]sx?$': 'babel-jest',
},
transformIgnorePatterns: ['node_modules/(?!dargs)'],
}
Loading