No Checkout

This commit is contained in:
Moritz Utcke
2025-04-28 17:07:26 -03:00
parent 75723d666e
commit f778641be6

View File

@@ -1,8 +1,7 @@
name: Auto Merge Staging into Main
on:
schedule:
- cron: '0 2 * * *' # 2:00 UTC = 4:00 Europäische Zeit
- cron: '0 2 * * *' # 2:00 UTC = 4:00 Europäische Zeit
workflow_dispatch:
jobs:
@@ -33,20 +32,13 @@ jobs:
exit 1
fi
- name: Checkout staging and create branch
id: create_branch
run: |
git checkout staging
git checkout -b auto-merge/staging-to-main
git push origin auto-merge/staging-to-main
- name: Create PR from staging → main
id: create_pr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: auto-merge staging into main"
branch: auto-merge/staging-to-main
branch: staging
base: main
title: "Auto-merge staging into main"
body: |
@@ -62,7 +54,6 @@ jobs:
pull-request-number: ${{ steps.create_pr.outputs.pull-request-number }}
merge-method: merge
notify_failure:
needs: merge
if: failure()
@@ -71,9 +62,9 @@ jobs:
- name: Send Discord notification on failure
run: |
curl -H "Content-Type: application/json" \
-X POST \
-d "{\"content\": \"🚨 Auto-Merge fehlgeschlagen! Bitte manuell prüfen: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \
${{ secrets.DISCORD_WEBHOOK_URL }}
-X POST \
-d "{\"content\": \"🚨 Auto-Merge fehlgeschlagen! Bitte manuell prüfen: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \
${{ secrets.DISCORD_WEBHOOK_URL }}
notify_success:
needs: merge
@@ -83,6 +74,6 @@ jobs:
- name: Send Discord notification on success
run: |
curl -H "Content-Type: application/json" \
-X POST \
-d "{\"content\": \"✅ Auto-Merge ausgeführt! Ergebnis jetzt auf [GitHub](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) und [online-energieausweis.org](https://online-energieausweis.org) einsehen.\"}" \
${{ secrets.DISCORD_WEBHOOK_URL }}
-X POST \
-d "{\"content\": \"✅ Auto-Merge ausgeführt! Ergebnis jetzt auf [GitHub](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) und [online-energieausweis.org](https://online-energieausweis.org) einsehen.\"}" \
${{ secrets.DISCORD_WEBHOOK_URL }}