Skip to content

Update stackoverflow badge #574

Update stackoverflow badge

Update stackoverflow badge #574

Workflow file for this run

name: Update stackoverflow badge
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *' # every day at midnight
jobs:
update-badge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- uses: actions/setup-node@v3
with:
node-version: 15
- run: npm ci
- id: update-badge
run: node ./update-badge-script.js
- name: Commit files
if: env.update-badge == 'true'
run: |
git config --local user.email "gihub-bot.tobse.eu"
git config --local user.name "github-james"
git add stackoverflow-badge.svg
git commit -m "πŸ€– Update Badge" -a
- name: Push changes
if: env.update-badge == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}