Empty Daily Commit #424
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: Empty Daily Commit | |
on: | |
schedule: | |
- cron: '20 20 * * *' | |
jobs: | |
rename_file: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out | |
uses: actions/checkout@main | |
- name: Rename File | |
run: | | |
current_date=$(date +'%d_%m_%Y') | |
previous_date=$(date -d 'yesterday' +'%d_%m_%Y') | |
original_filename="up_daily_commit_${previous_date}.txt" | |
new_filename="up_daily_commit_${current_date}.txt" | |
if [ -f "$original_filename" ]; then | |
mv "$original_filename" "$new_filename" | |
echo "Arquivo renomeado de $original_filename para $new_filename" | |
else | |
echo "Arquivo atual não encontrado: $original_filename" | |
fi | |
- name: Commit and Push | |
run: | | |
git config user.email "julio.cesar.enezio@gmail.com" | |
git config user.name "jceneziojr" | |
git add . | |
git commit -m "Daily commit to keep the app up and running" | |
git push |