Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
Update daily_work.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
likhonsible authored Aug 14, 2024
1 parent e71b73b commit 1184854
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/daily_work.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
schedule:
- cron: '*/5 * * * *' # Runs every 5 minutes
workflow_dispatch:

jobs:
commit:
runs-on: ubuntu-latest
Expand All @@ -15,7 +15,8 @@ jobs:

- name: Make changes
run: |
echo "Commit made at $(date '+%Y-%m-%d %H:%M:%S')" > log.txt
mkdir -p contributors
echo "Commit made at $(date '+%Y-%m-%d %H:%M:%S')" > contributors/log.txt
- name: Pull latest changes
run: git pull
Expand Down Expand Up @@ -80,10 +81,11 @@ jobs:
git config --global user.name "$name"
# Make the changes for the user
echo "Commit by $name at $(date '+%Y-%m-%d %H:%M:%S')" > "log_${name// /_}.txt"
log_file="contributors/log_${name// /_}.txt"
echo "Commit by $name at $(date '+%Y-%m-%d %H:%M:%S')" > "$log_file"
# Stage and commit the changes
git add "log_${name// /_}.txt"
git add "$log_file"
# Commit if there are changes to commit
if git diff --cached --quiet; then
Expand Down

0 comments on commit 1184854

Please sign in to comment.