Skip to content

Update AoC Badges

Update AoC Badges #60

Workflow file for this run

name: Update AoC Badges
on:
schedule: # run workflow based on schedule
- cron: '19 5 1-25 12 *' # from the 1. December till 25. December every day at 5:19am (avoid load at full hours)
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 hour to keep traffic on aoc site low
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # clones your repo
- uses: joblo2213/aoc-badges-action@v3
with:
userid: 23810 # your user id, see setup on how to obtain
session: ${{ secrets.AOC_SESSION }} # secret containing session code, see setup on how to obtain
year: 2023 # The year for which stats should be retrieved
file: 'README.md' # The file that contains the badges
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow&year=2023)' # Regular expression that finds the content of the stars badge in your file.
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-red&year=2023)' # Regular expression that finds the content of the days completed badge in your file.
- uses: joblo2213/aoc-badges-action@v3
with:
userid: 23810 # your user id, see setup on how to obtain
session: ${{ secrets.AOC_SESSION }} # secret containing session code, see setup on how to obtain
year: 2022 # The year for which stats should be retrieved
file: 'README.md' # The file that contains the badges
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow&year=2022)' # Regular expression that finds the content of the stars badge in your file.
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-red&year=2022)' # Regular expression that finds the content of the days completed badge in your file.
- uses: joblo2213/aoc-badges-action@v3
with:
userid: 23810 # your user id, see setup on how to obtain
session: ${{ secrets.AOC_SESSION }} # secret containing session code, see setup on how to obtain
year: 2021 # The year for which stats should be retrieved
file: 'README.md' # The file that contains the badges
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow&year=2021)' # Regular expression that finds the content of the stars badge in your file.
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-red&year=2021)' # Regular expression that finds the content of the days completed badge in your file.
- uses: joblo2213/aoc-badges-action@v3
with:
userid: 23810 # your user id, see setup on how to obtain
session: ${{ secrets.AOC_SESSION }} # secret containing session code, see setup on how to obtain
year: 2020 # The year for which stats should be retrieved
file: 'README.md' # The file that contains the badges
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow&year=2020)' # Regular expression that finds the content of the stars badge in your file.
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-red&year=2020)' # Regular expression that finds the content of the days completed badge in your file.
- uses: joblo2213/aoc-badges-action@v3
with:
userid: 23810 # your user id, see setup on how to obtain
session: ${{ secrets.AOC_SESSION }} # secret containing session code, see setup on how to obtain
year: 2019 # The year for which stats should be retrieved
file: 'README.md' # The file that contains the badges
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow&year=2019)' # Regular expression that finds the content of the stars badge in your file.
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-red&year=2019)' # Regular expression that finds the content of the days completed badge in your file.
- uses: joblo2213/aoc-badges-action@v3
with:
userid: 23810 # your user id, see setup on how to obtain
session: ${{ secrets.AOC_SESSION }} # secret containing session code, see setup on how to obtain
year: 2018 # The year for which stats should be retrieved
file: 'README.md' # The file that contains the badges
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow&year=2018)' # Regular expression that finds the content of the stars badge in your file.
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-red&year=2018)' # Regular expression that finds the content of the days completed badge in your file.
- uses: joblo2213/aoc-badges-action@v3
with:
userid: 23810 # your user id, see setup on how to obtain
session: ${{ secrets.AOC_SESSION }} # secret containing session code, see setup on how to obtain
year: 2017 # The year for which stats should be retrieved
file: 'README.md' # The file that contains the badges
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow&year=2017)' # Regular expression that finds the content of the stars badge in your file.
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-red&year=2017)' # Regular expression that finds the content of the days completed badge in your file.
- uses: joblo2213/aoc-badges-action@v3
with:
userid: 23810 # your user id, see setup on how to obtain
session: ${{ secrets.AOC_SESSION }} # secret containing session code, see setup on how to obtain
year: 2016 # The year for which stats should be retrieved
file: 'README.md' # The file that contains the badges
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow&year=2016)' # Regular expression that finds the content of the stars badge in your file.
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-red&year=2016)' # Regular expression that finds the content of the days completed badge in your file.
- uses: joblo2213/aoc-badges-action@v3
with:
userid: 23810 # your user id, see setup on how to obtain
session: ${{ secrets.AOC_SESSION }} # secret containing session code, see setup on how to obtain
year: 2015 # The year for which stats should be retrieved
file: 'README.md' # The file that contains the badges
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow&year=2015)' # Regular expression that finds the content of the stars badge in your file.
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-red&year=2015)' # Regular expression that finds the content of the days completed badge in 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