Skip to content
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

feat!: refactor action to be CLI based #348

Merged
merged 36 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9764fef
chore: remove js related files
Shurtu-gal Nov 23, 2023
4544e92
feat: setup initial action
Shurtu-gal Nov 23, 2023
2d8ffd7
feat: create a Makefile and action-config for ease of use
Shurtu-gal Nov 24, 2023
9b6f9f5
feat: add logic for validate
Shurtu-gal Nov 24, 2023
5a18636
feat: complete the logic for generate and optimize
Shurtu-gal Nov 24, 2023
dca0903
Merge branch 'master' of github.com:asyncapi/github-action-for-genera…
Shurtu-gal Nov 24, 2023
832fd36
feat: add documentaion and tests
Shurtu-gal Nov 26, 2023
48c2d1f
fix: possible fix for sonar-cloud
Shurtu-gal Nov 26, 2023
e7dc5eb
feat: remove config file from action
Shurtu-gal Dec 12, 2023
0a8a773
chore: make entrypoint.sh executable
Shurtu-gal Dec 12, 2023
287be09
chore: correct typo
Shurtu-gal Dec 12, 2023
a9b63c6
chore: update node version
Shurtu-gal Dec 12, 2023
18344c6
feat: update README.md
Shurtu-gal Dec 12, 2023
a71a465
Merge branch 'master' of github.com:asyncapi/github-action-for-genera…
Shurtu-gal Dec 12, 2023
205f6f7
chore: add package.json with test
Shurtu-gal Dec 19, 2023
ec63b1a
Merge branch 'master' of github.com:asyncapi/github-action-for-genera…
Shurtu-gal Dec 19, 2023
36b6e20
chore: remove unnecessary details
Shurtu-gal Dec 19, 2023
91fa27b
fix: sonarcloud warnings
Shurtu-gal Dec 19, 2023
8e62e7e
chore: add package-lock.json again :(
Shurtu-gal Dec 19, 2023
92ba8a1
fix: rename to fail-test to depict that it should fail
Shurtu-gal Dec 19, 2023
366664a
fix: tests
Shurtu-gal Dec 19, 2023
eeb7c79
fix: remove expensive global installation from package.json
Shurtu-gal Dec 19, 2023
3e426f6
feat: add basic test workflow
Shurtu-gal Dec 22, 2023
6d7805f
feat: refine test workflows
Shurtu-gal Dec 22, 2023
1fb04fe
chore: make requested changes
Shurtu-gal Jan 4, 2024
e05b297
feat: add tests for bundle, optimize and convert
Shurtu-gal Jan 4, 2024
face25a
Merge branch 'master' of github.com:asyncapi/github-action-for-genera…
Shurtu-gal Jan 4, 2024
de5b65c
chore: add DockerFile to sonar cloud ignore
Shurtu-gal Jan 8, 2024
7e6fb35
chore: remove non-root user
Shurtu-gal Jan 8, 2024
790b3c4
fix: add mkdir to test actions
Shurtu-gal Jan 8, 2024
9f1451d
chore: remove npm release
Shurtu-gal Jan 8, 2024
6960536
chore: update README
Shurtu-gal Jan 8, 2024
8e09a02
feat: add convert command
Shurtu-gal Jan 8, 2024
8aa45ad
chore: add chromium for PDF gen
Shurtu-gal Jan 8, 2024
63c42c8
fix: remove trailing aphostrophe from workflow
Shurtu-gal Jan 8, 2024
80f9bd9
fix: convert paths to absolute paths
Shurtu-gal Jan 8, 2024
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: 0 additions & 2 deletions .eslintignore

This file was deleted.

95 changes: 0 additions & 95 deletions .eslintrc

This file was deleted.

13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
FROM node:16 as builder
FROM node:16-alpine

COPY ./ /app
WORKDIR /app
RUN apk add --no-cache bash>5.1.16 git>2.42.0

RUN npm install
RUN npm install -g @asyncapi/cli

FROM node:16-alpine
COPY entrypoint.sh /entrypoint.sh

COPY --from=builder /app ./
RUN chmod +x /entrypoint.sh

ENTRYPOINT [ "node", "/lib/index.js" ]
ENTRYPOINT ["/entrypoint.sh"]
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
DEFAULT_VERSION = ''
Shurtu-gal marked this conversation as resolved.
Show resolved Hide resolved
DEFAULT_COMMAND = 'generate'
TEST_FILEPATH = 'test/asyncapi.yml'
DEFAULT_TEMPLATE = '@asyncapi/[email protected]'
DEFAULT_LANGUAGE = ''
DEFAULT_OUTPUT = 'output'
DEFAULT_PARAMETERS = ''
DEFAULT_CUSTOM_COMMANDS = ''
CUSTOM_COMMANDS = 'validate test/asyncapi.yml'
DEFAULT_VERBOSE = 'false'

run:
@bash ./entrypoint.sh $(DEFAULT_VERSION) $(DEFAULT_COMMAND) $(TEST_FILEPATH) $(DEFAULT_TEMPLATE) $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS) $(DEFAULT_VERBOSE)

test: test-1 test-2 test-3 test-4 test-5 test-6

test-1:
Shurtu-gal marked this conversation as resolved.
Show resolved Hide resolved
@bash ./entrypoint.sh 1.1.1 $(DEFAULT_COMMAND) $(TEST_FILEPATH) $(DEFAULT_TEMPLATE) $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS) $(DEFAULT_VERBOSE)

test-2:
@bash ./entrypoint.sh 1.1.1 'validate' $(TEST_FILEPATH) $(DEFAULT_TEMPLATE) $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS) $(DEFAULT_VERBOSE)

test-3:
@bash ./entrypoint.sh 1.1.1 'validate' './test/specification-invalid.yml' $(DEFAULT_TEMPLATE) $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS) $(DEFAULT_VERBOSE)

test-4:
@bash ./entrypoint.sh $(DEFAULT_VERSION) $(DEFAULT_COMMAND) $(TEST_FILEPATH) $(DEFAULT_TEMPLATE) 'typescript' './output/custom-output' $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS) $(DEFAULT_VERBOSE)

test-5:
@bash ./entrypoint.sh $(DEFAULT_VERSION) $(DEFAULT_COMMAND) $(TEST_FILEPATH) $(DEFAULT_TEMPLATE) 'typescript' './output/custom-output' $(DEFAULT_PARAMETERS) $(CUSTOM_COMMANDS) $(DEFAULT_VERBOSE)

test-6:
@bash ./entrypoint.sh $(DEFAULT_VERSION) $(DEFAULT_COMMAND) $(TEST_FILEPATH) '' $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS) $(DEFAULT_VERBOSE)
Loading