Skip to content

Commit de77156

Browse files
authored
Refine update_dsa workflow with git commands and messages
Updated the workflow to ensure proper git operations and added confirmation messages.
1 parent 77aef8d commit de77156

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/update_dsa.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
permissions:
1212
contents: write
1313

14-
# ✅ KEY FIX: Only one run at a time — new runs wait, not cancel
1514
concurrency:
1615
group: update-dsa-progress
1716
cancel-in-progress: false
@@ -48,13 +47,13 @@ jobs:
4847
run: |
4948
git config user.name "github-actions[bot]"
5049
git config user.email "github-actions[bot]@users.noreply.github.com"
51-
git pull --rebase origin main
5250
git add README.md
5351
if git diff --staged --quiet; then
54-
echo "No changes to commit, skipping."
52+
echo "No changes to commit, skipping."
5553
exit 0
5654
fi
5755
git commit -m "📊 Auto-update DSA progress table"
56+
git pull --rebase origin main
5857
git push
5958
6059
# ── 5. Checkout profile repo (rajit2004/rajit2004) ─────
@@ -69,7 +68,7 @@ jobs:
6968
- name: Update profile README
7069
run: |
7170
python - << 'EOF'
72-
import re, os
71+
import re
7372
7473
with open(".github/dsa_section.md", "r", encoding="utf-8") as f:
7574
new_section = f.read()
@@ -95,11 +94,11 @@ jobs:
9594
run: |
9695
git config user.name "github-actions[bot]"
9796
git config user.email "github-actions[bot]@users.noreply.github.com"
98-
git pull --rebase origin main
9997
git add README.md
10098
if git diff --staged --quiet; then
101-
echo "No changes to commit, skipping."
99+
echo "No changes to commit, skipping."
102100
exit 0
103101
fi
104102
git commit -m "📊 Auto-update DSA progress table from java_progress"
103+
git pull --rebase origin main
105104
git push

0 commit comments

Comments
 (0)