No description
Find a file
2025-12-17 15:41:47 -05:00
action.yml chore: labels 2025-12-17 15:41:47 -05:00
Dockerfile Initial commit 2025-12-17 14:57:08 -05:00
entrypoint.sh chore: labels 2025-12-17 15:41:47 -05:00
README.md Update README.md 2025-12-17 20:18:41 +00:00

forgejo-create-pull-request

A Docker-based Forgejo Action that:

  • takes whatever changes exist in the workspace (including untracked files),
  • applies them onto a new or reset branch created from a chosen base branch,
  • commits + pushes that branch to origin, and
  • creates a pull request (or reuses an existing PR) on the current Forgejo instance.

Quick start workflow

Create .forgejo/workflows/create-pr.yml:

name: Create PR from generated changes

on:
  workflow_dispatch:
  push:
    branches: ["main"]

jobs:
  pr:
    runs-on: docker
    steps:
      - name: Checkout
        uses: https://data.forgejo.org/actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Make changes
        run: |
          echo "generated $(date -u)" >> generated.txt

      - name: Create PR
        id: cpr
        uses: insidiousfiddler/forgejo-create-pull-request@master
        with:
          base: main
          branch: automation/generated-${{ forgejo.run_number }}
          title: "chore: update generated files"
          body: |
            Automated update from run ${{ forgejo.run_number }}.

      - name: Show PR URL
        run: echo "PR: ${{ steps.cpr.outputs.pull-request-url }}"