Skip to content

Commit

Permalink
Merge branch 'asyncapi:master' into report_parse_failure_reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-ball-ctct authored Nov 20, 2023
2 parents 7c98c25 + 23f3ce5 commit 8da9585
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
env:
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
GITHUB_LOGIN: asyncapi-bot
MERGE_LABELS: ""
MERGE_LABELS: "!do-not-merge"
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})"
MERGE_RETRIES: "20"
Expand Down
35 changes: 28 additions & 7 deletions .github/workflows/update-docs-on-docs-commits.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# This workflow is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# The given workflow is responsible for generating docs and creating PR with them when there is a commit with docs: prefix

# This workflow will be updated in all repos with the topic get-global-docs-autoupdate

name: 'Update generated parts of documentation on docs: commits'

on:
Expand All @@ -8,29 +15,43 @@ on:
jobs:
docs-gen:
name: 'Generate docs and create PR'
runs-on: ubuntu-latest
# PR should be created within this GH action only if it is a docs: commit
# Otherwise it will conflict with release workflow
if: startsWith(github.event.commits[0].message, 'docs:')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/checkout@v4
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install dependencies
run: npm ci
- name: Regenerate docs
run: npm run generate:assets --if-present
- name: Create Pull Request with updated docs
if: startsWith(github.event.commits[0].message, 'docs:')
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # use 4.2.4 https://github.com/peter-evans/create-pull-request/releases/tag/v4.2.4
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # uses 5.0.2 https://github.com/peter-evans/create-pull-request/releases/tag/v5.0.2
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'chore: update generated docs'
committer: asyncapi-bot <[email protected]>
author: asyncapi-bot <[email protected]>
title: 'chore: update generated docs'
body: 'Update of docs that are generated and were forgotten on PR level.'
branch: gen-docs-update
branch: gen-docs-update/${{ github.job }}
- name: Report workflow status to Slack
if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #using https://github.com/8398a7/action-slack/releases/tag/v3.15.1
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'AsyncAPI docs generation workflow failed'
author_name: asyncapi-bot
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
155 changes: 12 additions & 143 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/generator",
"version": "1.14.1",
"version": "1.14.3",
"description": "The AsyncAPI generator. It can generate documentation, code, anything!",
"main": "./lib/generator.js",
"bin": {
Expand Down Expand Up @@ -48,8 +48,8 @@
"license": "Apache-2.0",
"homepage": "https://github.com/asyncapi/generator",
"dependencies": {
"@asyncapi/generator-react-sdk": "^0.2.23",
"@asyncapi/parser": "^2.1.1",
"@asyncapi/generator-react-sdk": "^1.0.2",
"@asyncapi/parser": "^2.1.2",
"@npmcli/arborist": "^2.2.4",
"@smoya/multi-parser": "^4.0.0",
"ajv": "^8.12.0",
Expand Down

0 comments on commit 8da9585

Please sign in to comment.