Skip to content

Update MKRS

Update MKRS #8470

Workflow file for this run

name: Update MKRS
on:
workflow_dispatch:
schedule:
- cron: '0 */8 * * *'
push:
branches:
- main
paths:
- mkrs.json
jobs:
Update-MKRS-Stats:
runs-on: ubuntu-latest
steps:
- run: echo "Trigger = ${{ github.event_name }}"
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install Packages
run: |
cd update
npm install
- name: Run Program
timeout-minutes: 110
run: |
cd update
node index.js
- name: Check Updates
id: git-check
run: echo ::set-output name=modified::$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)
- name: Commit Updates
if: steps.git-check.outputs.modified == 'true'
run: |
git config user.name github-actions
git config user.email github-actions@github.com
echo "################### SIZE"
ls -hal
echo "################### HEAD"
head -n100 mkrs.json
echo "################### TAIL"
tail -n100 mkrs.json
git add .
git commit -m "updated $(date)"
git pull --rebase --strategy-option=ours
git push
- run: echo "Status = ${{ job.status }}"