-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Release Docker Image | ||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
|
||
release: | ||
name: Docker build and push | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- name: Get version without v character | ||
id: version | ||
run: | | ||
VERSION=${{github.event.release.tag_name}} | ||
VERSION_WITHOUT_V=${VERSION:1} | ||
echo "::set-output name=value::$(echo $VERSION_WITHOUT_V)" | ||
- name: Release to Docker | ||
run: | | ||
echo ${{secrets.DOCKER_PASSWORD}} | docker login -u ${{secrets.DOCKER_USERNAME}} --password-stdin | ||
npm run docker:build | ||
docker tag asyncapi/github-action-for-generator:latest asyncapi/github-action-for-generator:${{ steps.version.outputs.value }} | ||
docker push asyncapi/github-action-for-generator:${{ steps.version.outputs.value }} | ||
docker push asyncapi/github-action-for-generator:latest |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
coverage | ||
.DS_Store | ||
output | ||
node_modules/semantic-release | ||
node_modules/@semantic-release | ||
node_modules | ||
dist |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:16 as builder | ||
|
||
COPY ./ /app | ||
WORKDIR /app | ||
|
||
RUN npm install && npm run package | ||
|
||
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 | ||
|
||
ENTRYPOINT [ "node", "/dist/index.js" ] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ In case all defaults are fine for you, just add such step: | |
|
||
```yaml | ||
- name: Generating Markdown from my AsyncAPI document | ||
uses: asyncapi/github-action-for-generator@v1 | ||
uses: docker://asyncapi/github-action-for-generator:2.0.0 | ||
``` | ||
### Using all possible inputs | ||
|
@@ -45,7 +45,7 @@ In case you do not want to use defaults, you for example want to use different t | |
```yaml | ||
- name: Generating HTML from my AsyncAPI document | ||
uses: asyncapi/github-action-for-generator@v1 | ||
uses: docker://asyncapi/github-action-for-generator:2.0.0 | ||
with: | ||
template: '@asyncapi/[email protected]' #In case of template from npm, because of @ it must be in quotes | ||
filepath: docs/api/my-asyncapi.yml | ||
|
@@ -80,7 +80,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: asyncapi/github-action-for-generator@v1 | ||
uses: docker://asyncapi/github-action-for-generator:2.0.0 | ||
with: | ||
template: '@asyncapi/[email protected]' #In case of template from npm, because of @ it must be in quotes | ||
filepath: docs/api/my-asyncapi.yml | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.