Update Year #6
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 Year | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 2 1 *' | |
jobs: | |
yearly-update: | |
name: Scheduled Year Update | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Modify year | |
run: sed -i "s/^\( \{28\}\)[0-9]\{4\}\./\1$(date +"%Y")./g" static-site/index.html | |
- name: Commit Yearly Update | |
if: success() | |
run: |- | |
git config user.name actions-bot | |
git config user.email [email protected] | |
git add static-site/index.html | |
git commit -m "chore🚀: updated year" || exit 0 | |
git push | |
call-docker: | |
uses: ./.github/workflows/docker.yaml | |
needs: | |
- yearly-update | |