Skip to content

Commit

Permalink
fix: remove ncc packaging (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Mar 28, 2023
1 parent 7c215d0 commit a80a16e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
FROM node:14 as builder
FROM node:16 as builder

COPY ./ /app
WORKDIR /app

RUN npm install && npm run package
RUN npm install

FROM node:14-alpine
FROM node:16-alpine

# We need to copy entire node modules as some dependencies (@npmcli/run-script) cannot be packaged
# and need to be used by dist as external dependency
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app ./

ENTRYPOINT [ "node", "/dist/index.js" ]
ENTRYPOINT [ "node", "/lib/index.js" ]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:

#In case you do not want to use defaults, you for example want to use different template
- name: Generating HTML from my AsyncAPI document
uses: docker://asyncapi/github-action-for-generator:2.0.0
uses: docker://asyncapi/github-action-for-generator:2.0.0 #always use latest tag as each is pushed to docker
with:
template: '@asyncapi/[email protected]' #In case of template from npm, because of @ it must be in quotes
filepath: docs/api/my-asyncapi.yml
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
"name": "github-action-for-generator",
"version": "2.1.11",
"description": "GitHub action to generate all the things form your AsyncAPI document",
"main": "dist/index.js",
"main": "lib/index.js",
"scripts": {
"release": "semantic-release",
"lint": "eslint --max-warnings 0 --config .eslintrc lib",
"package": "ncc build lib/index.js -o dist -s --external=\"@npmcli/run-script\"",
"test": "jest --coverage",
"start": "node lib/index.js",
"generate:assets": "echo 'No additional assets need to be generated at the moment'",
Expand Down

0 comments on commit a80a16e

Please sign in to comment.