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

Commit

Permalink
Create daily_work.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
likhonsible authored Aug 14, 2024
1 parent a78a043 commit 615d1a4
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/daily_work.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Daily Work

on:
schedule:
- cron: '*/5 * * * *' # Runs every 5 minutes
workflow_dispatch:

jobs:
commit:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Make changes
run: |
echo "Commit made at $(date '+%Y-%m-%d %H:%M:%S')" > log.txt
- name: Pull latest changes
run: git pull

- name: Commit and Push for Multiple Users
run: |
# List of users
users=(
"[email protected]:rNLKJA"
"[email protected]:Martin Nilsson"
"[email protected]:Heekang Park"
"[email protected]:Chen Zhiwei"
"[email protected]:Ben Cunningham"
"[email protected]:hdknr"
"[email protected]:Sanghyuk Jung"
"[email protected]:Gijs Joost Brouwer"
"[email protected]:Mercedes-benz"
"[email protected]:Lamborghini"
"[email protected]:anushka"
"[email protected]:Han Solo"
"[email protected]:Patrick Raco"
"[email protected]:DEVTYPE"
"[email protected]:DEVTYPE"
"[email protected]:DEVTYPE"
"[email protected]:DEVTYPE"
"[email protected]:DEVTYPE"
"[email protected]:nhphuong91"
"[email protected]:minkj1992"
"Peyman Hooshmandi Raad:Peyman Hooshmandi Raad"
"[email protected]:awnish kumar"
"[email protected]:pico.dev"
"[email protected]:neeraj dantu"
"[email protected]:vibhordubey333"
"TonyChou:[email protected]"
"nome:[email protected]"
"JuraganTahu:[email protected]"
"xhercules:[email protected]"
"ladnjay:[email protected]"
"[email protected]:Hakan Celik"
"Avinash Kumar:[email protected]"
"[email protected]:tystapler"
"Alex:[email protected]"
"danielk0121:[email protected]"
"indexzero:[email protected]"
"Seu nome:seu@email"
"[email protected]:jackson.dgmedeiros"
"[email protected]:Manbing"
"Nag:[email protected]"
"Junior Mayhe:[email protected]"
"DATASAGA:[email protected]"
"[email protected]:wangshijun"
)
for user in "${users[@]}"; do
email="${user%%:*}"
name="${user##*:}"
echo "Processing user: $name <$email>"
# Set Git user details globally
git config --global user.email "$email"
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"
# Stage and commit the changes
git add "log_${name// /_}.txt"
# Commit if there are changes to commit
if git diff --cached --quiet; then
echo "No changes to commit for $name"
else
git commit -m "Daily update by $name at $(date '+%Y-%m-%d %H:%M:%S')"
git push
echo "Changes pushed for $name"
fi
done

0 comments on commit 615d1a4

Please sign in to comment.