Day 20 part 1 #15
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 23 | |
on: | |
push: # run on push, be careful with this setting | |
# as the workflow should only be triggered at a rate lower than | |
# 4 times a hour to keep traffic on aoc site low | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 # clones your repo | |
- uses: joblo2213/aoc-badges-action@v3 | |
with: | |
userid: 2263584 | |
session: ${{ secrets.SESSION }} | |
year: 2023 | |
dayRegex: '(?<=https:\/\/img\.shields\.io\/badge\/day%20📅-)[0-9]+(?=-lightblue)' # make sure the day of 2023 is not overwritten, i.e. use red here, blue is used for 2023 | |
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow)' # Regular expression that finds the content of the stars badge in your file. | |
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/completed-)[0-9]+(?=-darkblue)' # Regular expression that finds the content of the days completed badge iun your file. | |
- uses: joblo2213/aoc-badges-action@v3 | |
with: | |
userid: 2263584 | |
session: ${{ secrets.SESSION }} | |
# Optional inputs: | |
year: 2022 # The year for which stats should be retrieved | |
# 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]+(?=-red)' # make sure the day of 2023 is not overwritten, i.e. use red here, blue is used for 2023 | |
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/⭐%20stars%20⭐-)[0-9]+(?=-yellow)' # Regular expression that finds the content of the stars badge in your file. | |
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-darkblue)' # Regular expression that finds the content of the days completed badge iun your file. | |
- uses: stefanzweifel/git-auto-commit-action@v4 # Step that pushes these local changes back to your github repo | |
with: | |
commit_message: Update badges | |
file_pattern: README.md |