Skip to content

Update generated site files #9

Update generated site files

Update generated site files #9

Workflow file for this run

name: Update RMM Tools Badge
on:
push:
branches:
- main
jobs:
update-badge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PUSH_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Update badge
run: python bin/update_badge.py
- name: Commit and push if changed
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git config --global push.default simple
git add rmm-tools-count.json
git diff --quiet && git diff --staged --quiet || (git commit -m "Update RMM Tools count badge" && git pull --rebase origin main && git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:${GITHUB_REF})