-
-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (40 loc) · 1.37 KB
/
supported-devices.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
# name of the workflow
name: Create the supported devices file
# perform this only on these types
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 */2 *'
# list the jobs
jobs:
# job item 1
job2:
name: Generate the SupportedDeviceList.md file
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Convert JSON to Markdown
run: node ./.github/supported-devices.js
- name: Get date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_ENV"
- name: Commit changes
run: |
git config user.name "mb-actions[bot]"
git config user.email "[email protected]"
git add -A
git diff --quiet && git diff --staged --quiet || git commit -m "Auto-update SupportedDeviceList.md"
- name: Create Pull Request
id: create-pr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.BOT_ACCESS_TOKEN }}
commit-message: 'Auto-update SupportedDeviceList.md'
title: ${{ env.date }} - Auto-update SupportedDeviceList.md
body: 'This is an auto-generated PR to update the SupportedDeviceList.md'
branch: 'auto-update/supported-devices'