Skip to content

Create the supported devices file #11

Create the supported devices file

Create the supported devices file #11

# 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'