forked from asyncapi/website
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 2.39 KB
/
regenerate-meetings-and-videos.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
45
46
47
48
49
50
51
52
53
54
55
56
57
name: List everyday latest list of AsyncAPI Meetings, Newsroom Videos and Dashboard data.
on:
workflow_dispatch:
schedule:
#every day at midnight
- cron: "10 0 * * *"
jobs:
meetings:
if: github.repository == 'asyncapi/website'
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
YOUTUBE_TOKEN: ${{ secrets.YOUTUBE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
name: Regenerate meetings.json and dashboard.json
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- 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: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install dependencies
run: npm install
- name: Regenerate
run: npm run generate:meetings && npm run generate:videos && npm run generate:dashboard
- name: Create Pull Request with new meetings.json, newsroom-videos.json and dashboard.json version
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # use 4.2.4 https://github.com/peter-evans/create-pull-request/releases/tag/v4.2.4
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'chore: update meetings.json, newsrooom_videos.json and dashboard.json'
committer: asyncapi-bot <[email protected]>
author: asyncapi-bot <[email protected]>
title: 'chore: update meetings.json and newsrooom_videos.json'
branch: update-meetings/${{ github.sha }}
- 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@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #using https://github.com/8398a7/action-slack/releases/tag/v3.15.1
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'AsyncAPI Meetings and Videos workflow failed'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}