Update AoC Badges #93
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update AoC Badges | |
on: | |
schedule: # run workflow based on schedule | |
- cron: '0 6 1-25 12 *' # from the 1. December till 25. December every day at 6am | |
workflow_dispatch: # allow to manually start the workflow | |
# push: # (disabled) run on push, be carefull with this setting | |
# as the workflow should only be triggered at a rate lower than | |
# 4 times a houre to keep traffic on aoc site low | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 # clones your repo, make sure the ssh secret is set! | |
with: | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.GH_PAT }} # token-based checkout is required because of branch protections on master | |
- uses: joblo2213/aoc-badges-action@v3 | |
with: | |
userid: ${{ secrets.AOC_BOARD_ID }} # your user id, see setup on how to obtain | |
session: ${{ secrets.AOC_SESSION }} # secret containing session code, see setup on how to obtain | |
# Optional inputs: | |
# | |
# leaderboard: 'https://adventofcode.com/2020/leaderboard/private/view/00000.json' # The url of the leaderboard from witch the data is fetched. Typically your private leaderboard. | |
# file: 'README.md' # The file that contains the badges | |
# dayRegex: '(?<=https:\/\/img\.shields\.io\/badge\/day%20📅-)[0-9]+(?=-blue)' # Regular expression that finds the content of the day badge iun your file. | |
# starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow)' # Regular expression that finds the content of the stars badge iun your file. | |
# daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-red)' # Regular expression that finds the content of the days completed badge iun your file. | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
name: Push changes # Step that pushes these local changes back to your github repo | |
with: | |
commit_message: 'docs: Update badges [skip ci]' | |
file_pattern: README.md |