No description
| action.yml | ||
| Dockerfile | ||
| entrypoint.sh | ||
| README.md | ||
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 }}"