commit 02f15567cead42b0157a24299c4b878764d4463f
parent dc717575302eee483f27770f8d5c110b958c32d7
Author: Silas Brack <silasbrack@gmail.com>
Date: Mon, 1 Jun 2026 17:14:57 +0200
chore: simplify CI to just push branch, skip PR creation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 3 insertions(+), 31 deletions(-)
diff --git a/.forgejo/workflows/bump-infra.yml b/.forgejo/workflows/bump-infra.yml
@@ -8,16 +8,12 @@ jobs:
bump:
runs-on: native
steps:
- - name: Bump daily-tracker in infrastructure and create PR
- env:
- FORGEJO_TOKEN: ${{ secrets.INFRA_PR_TOKEN }}
+ - name: Bump daily-tracker in infrastructure
run: |
set -euo pipefail
INFRA_REPO="ssh://forgejo@git.fnarglebeast.com/silas/infrastructure.git"
BRANCH="bump-daily-tracker"
- API_URL="https://git.fnarglebeast.com/api/v1"
- REPO="silas/infrastructure"
# Clone infrastructure repo
WORKDIR=$(mktemp -d)
@@ -30,10 +26,11 @@ jobs:
# Check if anything changed
if git diff --quiet flake.lock; then
echo "No changes to flake.lock, skipping"
+ rm -rf "$WORKDIR"
exit 0
fi
- # Commit and push
+ # Commit and push branch
git checkout -b "$BRANCH"
git add flake.lock
git \
@@ -42,30 +39,5 @@ jobs:
commit -m "chore: bump daily-tracker"
git push -f origin "$BRANCH"
- # Close existing PR if any
- EXISTING=$(curl -sf \
- -H "Authorization: token $FORGEJO_TOKEN" \
- "$API_URL/repos/$REPO/pulls?state=open&head=silas:$BRANCH" \
- | jq '.[0].number // empty')
- if [ -n "$EXISTING" ]; then
- curl -sf -X PATCH \
- -H "Authorization: token $FORGEJO_TOKEN" \
- -H "Content-Type: application/json" \
- -d '{"state": "closed"}' \
- "$API_URL/repos/$REPO/pulls/$EXISTING"
- fi
-
- # Create PR via API
- curl -sf -X POST \
- -H "Authorization: token $FORGEJO_TOKEN" \
- -H "Content-Type: application/json" \
- -d "{
- \"title\": \"chore: bump daily-tracker\",
- \"head\": \"$BRANCH\",
- \"base\": \"main\",
- \"body\": \"Automated bump of daily-tracker flake input.\"
- }" \
- "$API_URL/repos/$REPO/pulls"
-
# Cleanup
rm -rf "$WORKDIR"