Skip to content

Update project progress #45

Update project progress

Update project progress #45

name: Update project progress
on:
workflow_dispatch:
jobs:
update-number:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update with days elapsed since start of competition (March 1st, 2024)
run: |
days_elapsed=$(( ( $(date +%s) - $(date -d '2024-03-01' +%s) ) / 86400 + 1 ))
perl -i -pe "s/<span>\d+<\/span>%/<span>${days_elapsed}<\/span>%/" README.md
- name: Commit and push if changed
run: |
git config --global user.email "[email protected]"
git config --global user.name "Mateusz Migas"
git diff
git commit -am "Update project progress" || echo "No changes to commit"
git push