forked from asyncapi/website
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (42 loc) · 1.5 KB
/
regenerate-tools.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: List of all the tools used in AsyncAPI
on:
workflow_dispatch:
schedule:
#every day at midnight
- cron: "15 0 * * 1"
jobs:
regenerateTools:
if: github.repository == 'asyncapi/website'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
name: Regenerate tools.json
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
run: npm install
- name: Regenerate
run: npm run generate:tools
- name: Create Pull Request with new tools.json version
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'chore: update tools.json'
committer: asyncapi-bot <[email protected]>
author: asyncapi-bot <[email protected]>
title: 'chore: update tools.json'
branch: update-tools/${{ github.job }}
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
name: Report workflow run status to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'AsyncAPI Tools workflow failed'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}