Auto Push #196
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: Auto Push | |
on: | |
schedule: | |
- cron: '0 0 * * *' # S'exécute tous les jours à minuit | |
push: | |
branches: | |
- main | |
jobs: | |
auto-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Make 30 commits | |
run: | | |
for i in {1..30} | |
do | |
echo "Commit number $i on $(date)" >> auto-push-file.md | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add auto-push-file.md | |
git commit -m "Auto-push commit $i" | |
echo "Commit $i done" | |
done | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |