diff --git a/.gitea/workflows/update-calendar.yaml b/.gitea/workflows/update-calendar.yaml index dfb3079..444eb1c 100644 --- a/.gitea/workflows/update-calendar.yaml +++ b/.gitea/workflows/update-calendar.yaml @@ -15,7 +15,7 @@ on: concurrency: group: update-calendar - cancel-in-progress: false + cancel-in-progress: true jobs: update-calendar: @@ -33,14 +33,18 @@ jobs: run: | pip install pyyaml + - name: Pull latest changes + run: | + git config --local user.email "noreply@thelinuxcast.org" + git config --local user.name "Calendar Bot" + git pull origin main + - name: Generate calendar files run: | python generate_calendar.py - name: Commit and push changes run: | - git config --local user.email "noreply@thelinuxcast.org" - git config --local user.name "Calendar Bot" git add calendar.ics README.md if git diff --staged --quiet; then echo "No changes to commit" @@ -48,16 +52,5 @@ jobs: git commit -m "Auto-update calendar files 🤖 Generated with automation" - # Pull latest changes and rebase our commit on top - git pull --rebase origin main || { - # If rebase fails, regenerate files to resolve conflicts - git rebase --abort - git pull origin main - python generate_calendar.py - git add calendar.ics README.md - git commit -m "Auto-update calendar files - - 🤖 Generated with automation" - } git push fi