Update .forgejo/workflows/generate-m3u.yml
All checks were successful
Generate M3U Playlist with Auto-Organization / build-and-organize (push) Successful in 1m29s
All checks were successful
Generate M3U Playlist with Auto-Organization / build-and-organize (push) Successful in 1m29s
This commit is contained in:
parent
884b6e1816
commit
1417e316ea
1 changed files with 14 additions and 8 deletions
|
@ -25,8 +25,6 @@ jobs:
|
||||||
|
|
||||||
- name: Basic Setup
|
- name: Basic Setup
|
||||||
run: |
|
run: |
|
||||||
# This step previously contained explicit cleanup and Python setup.
|
|
||||||
# These are now handled by the environment or within generate_playlist.py if needed.
|
|
||||||
echo "Basic setup complete."
|
echo "Basic setup complete."
|
||||||
|
|
||||||
- name: Run Playlist Generation
|
- name: Run Playlist Generation
|
||||||
|
@ -39,19 +37,27 @@ jobs:
|
||||||
git add .
|
git add .
|
||||||
if ! git diff-index --quiet HEAD; then
|
if ! git diff-index --quiet HEAD; then
|
||||||
echo "Changes detected, committing..."
|
echo "Changes detected, committing..."
|
||||||
# Fetch latest changes from remote and rebase local changes on top
|
|
||||||
|
# --- NEW STEPS ---
|
||||||
|
# 1. Commit the changes made by this workflow locally first.
|
||||||
|
# This puts the local repository in a clean state for git pull --rebase.
|
||||||
|
CHANNELS=$(grep -c "^#EXTINF" playlist.m3u || echo "0")
|
||||||
|
git commit -m "📺 Workflow generated files: $CHANNELS channels (temp commit for rebase)"
|
||||||
|
|
||||||
|
# 2. Pull the latest changes from remote and rebase our local commit on top.
|
||||||
git pull --rebase origin main
|
git pull --rebase origin main
|
||||||
|
|
||||||
# Get channel count for commit message
|
# --- END NEW STEPS ---
|
||||||
CHANNELS=$(grep -c "^#EXTINF" playlist.m3u || echo "0")
|
|
||||||
git commit -m "📺 Updated playlist with $CHANNELS channels - $(date '+%Y-%m-%d %H:%M')"
|
# Now, push the rebased commit.
|
||||||
git push
|
git push
|
||||||
echo "Changes committed"
|
echo "Changes committed successfully"
|
||||||
|
else
|
||||||
|
echo "No changes to commit"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Summary
|
- name: Summary
|
||||||
run: |
|
run: |
|
||||||
# Get channel count for summary
|
|
||||||
CHANNELS=$(grep -c "^#EXTINF" playlist.m3u || echo "0")
|
CHANNELS=$(grep -c "^#EXTINF" playlist.m3u || echo "0")
|
||||||
echo "=== WORKFLOW COMPLETE ==="
|
echo "=== WORKFLOW COMPLETE ==="
|
||||||
echo "✅ Playlist has $CHANNELS channels"
|
echo "✅ Playlist has $CHANNELS channels"
|
Loading…
Add table
Add a link
Reference in a new issue