[t-mmyx6d0xfp0x] fix: open a pull request when main is protected (#1)
test / test (push) Successful in 5s
test / test (push) Successful in 5s
This commit was merged in pull request #1.
This commit is contained in:
1 parent
43875de6b4
commit
f8ea90faaa
6 files changed
+238
-56
No files matched your search
@@ -4,9 +4,8 @@ Composite Gitea Action that bumps a `FROM <image>:<tag>` line in a target
|
||||
repo's Dockerfile, then commits and pushes. The target repo's CI fires on
|
||||
that push, rebuilding against the new base.
|
||||
|
||||
The only consumer today is `fritzlab/base` triggering a rebuild of
|
||||
`fritzlab/runner` whenever the base image changes. This action is the
|
||||
generalization of that pattern.
|
||||
Consumers: `fritzlab/base` (→ base-dev), `fritzlab/base-dev`
|
||||
(→ runner, base-agent) and `fritzlab/base-agent` (→ agent).
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -36,7 +35,7 @@ generalization of that pattern.
|
||||
| `image` | yes | — | Image to look for in the FROM line. |
|
||||
| `tag` | no | `github.run_number` | New tag to write into FROM. |
|
||||
| `file` | no | `Dockerfile` | File inside target-repo to edit. |
|
||||
| `token` | yes | — | `CI_BOT_TOKEN` with write to target-repo. |
|
||||
| `token` | yes | — | `CI_BOT_TOKEN` with write to target-repo (push a branch, open a pull request). |
|
||||
| `host` | no | `code.fritzlab.net` | Gitea host without protocol. |
|
||||
| `message` | no | `bump <name> to #<tag>` | Commit message override. |
|
||||
|
||||
@@ -49,6 +48,10 @@ generalization of that pattern.
|
||||
4. If no diff (target already on this tag): exit 0 silently.
|
||||
5. Otherwise commit + push to `main` with rebase-on-conflict retry up to
|
||||
3 times.
|
||||
6. If branch protection refuses the push (`Not allowed to push to protected
|
||||
branch main`), push the commit to `cascade/<name>-<tag>` and open a pull
|
||||
request against `main` instead. A re-run reuses that branch and pull request.
|
||||
The bump then lands through the target's normal review.
|
||||
|
||||
## Notes
|
||||
|
||||
@@ -59,3 +62,8 @@ generalization of that pattern.
|
||||
own. There is no end-to-end orchestration: the upstream repo's CI completes
|
||||
the moment cascade-from pushes, regardless of whether the downstream build
|
||||
succeeds.
|
||||
|
||||
## Tests
|
||||
|
||||
`bash tests/run` drives `cascade.sh` against local bare repositories (a
|
||||
pre-receive hook stands in for branch protection) and a stubbed Gitea API.
|
||||
Reference in new issue
Block a user