mirror of
https://github.com/tiennm99/awesome-advent-of-code.git
synced 2026-10-15 14:16:16 +00:00
36 lines
894 B
YAML
36 lines
894 B
YAML
name: Update AoC badge
|
|
|
|
on:
|
|
push:
|
|
schedule:
|
|
- cron: '0 0 * 1-11 1'
|
|
- cron: '0 * * 12 *'
|
|
|
|
jobs:
|
|
update:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.ref }}
|
|
fetch-depth: 0
|
|
|
|
- name: Install packages
|
|
run: yarn
|
|
working-directory: ./.github/actions/update-badge
|
|
|
|
- name: Use local action
|
|
uses: ./.github/actions/update-badge
|
|
with:
|
|
ghToken: ${{ secrets.GITHUB_TOKEN }}
|
|
fileNames: README.md 2024.md 2023.md 2022.md 2021.md 2020.md 2019.md 2018.md
|
|
|
|
- name: Git commit and push
|
|
run: |
|
|
git config user.email 'actions@github.com'
|
|
git config user.name 'github-actions'
|
|
if git commit -am 'update badges'; then
|
|
git push origin HEAD:${{ github.ref }}
|
|
fi
|