This repository was archived by the owner on Sep 9, 2025. It is now read-only.
automate #70
This file contains hidden or 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: automate | |
| on: | |
| schedule: | |
| - cron: '0 10 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| auto-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Cloner le dépôt | |
| uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: discord | |
| - name: update calandar | |
| run: | | |
| DATE=$(date -u +"%d/%m/%Y") | |
| LINE="Today $DATE" | |
| if grep -q "Today" README.md; then | |
| sed -i "s|Today.*|$LINE|" README.md | |
| else | |
| echo -e "\n$LINE" >> README.md | |
| fi | |
| - name: Commit et push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git commit -m "README.md" || echo "Pas de changements" | |
| git push |