Skip to content

[TASK] Migrate backport to shared reusable workflow#6414

Closed
CybotTM wants to merge 0 commit intoTYPO3-Documentation:mainfrom
CybotTM:demo/shared-backport-workflow
Closed

[TASK] Migrate backport to shared reusable workflow#6414
CybotTM wants to merge 0 commit intoTYPO3-Documentation:mainfrom
CybotTM:demo/shared-backport-workflow

Conversation

@CybotTM
Copy link
Copy Markdown
Contributor

@CybotTM CybotTM commented Mar 9, 2026

Problem

The backport workflow is currently inlined in each repo with identical configuration. When m-kuhn/backport@30b6e83 broke (missing dist/index.js), each repo had to be fixed individually. 7 repos still use the broken action:

  • TYPO3CMS-Reference-TCA
  • TYPO3CMS-Reference-Typoscript
  • TYPO3CMS-Reference-ViewHelper
  • TYPO3CMS-Tutorial-GettingStarted
  • TYPO3CMS-Tutorial-SitePackage
  • TYPO3CMS-Guide-FrontendLocalization
  • blog_example

CoreApi was already fixed (migrated to korthout/backport-action), but the workflow is still inlined.

Solution

Replace the inline workflow with a call to the shared reusable workflow from TYPO3-Documentation/.github, the org's community health repository. This wraps korthout/backport-action and is automatically accessible to all repos in the org without allow-list changes.

Before/After

Before (22 lines, inline, maintained per-repo):

jobs:
  backport:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
    steps:
      - uses: actions/checkout@...
      - uses: korthout/backport-action@...
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}

After (5 lines, shared, maintained centrally):

jobs:
  backport:
    uses: TYPO3-Documentation/.github/.github/workflows/reusable-backport.yml@main
    with:
      label_pattern: "backport *"

Benefits

  • Single point of maintenance — update the action version once, all repos benefit
  • Consistent configuration — label patterns, permissions, behavior identical everywhere
  • Faster incident response — broken action? Fix one repo, not 8
  • No allow-list changes needed — the .github repo is the org community health repo, automatically trusted by all org repos

Status

Same change needed in 7 other repos. Companion PRs:

Dependencies and merge order

  • Depends on .github#4 (backport label_pattern fix on main)
  • Uses reusable-backport.yml which already exists on .github main

@garvinhicking
Copy link
Copy Markdown
Contributor

(Please note this is a POC we should not merge as-is, because we'd first have to import the referenced repo into our own maintenance scope. Thanks a lot, this is very helpful for discussion!)

@CybotTM CybotTM changed the title WIP: [TASK] Demo: Migrate backport to shared reusable workflow [TASK] Demo: Migrate backport to shared reusable workflow Mar 9, 2026
@linawolf
Copy link
Copy Markdown
Member

@CybotTM thanks for your work. Could we put the into https://github.com/TYPO3-Documentation/t3docs-ci-deploy? it is already the repository for "Build and Deployment Pipelines".

@CybotTM
Copy link
Copy Markdown
Contributor Author

CybotTM commented Mar 11, 2026

@linawolf, yes of course!

CybotTM added a commit to CybotTM/t3docs-ci-deploy that referenced this pull request Mar 11, 2026
Add centralized, reusable GitHub Actions workflows that can be called
by repositories across the TYPO3-Documentation organization:

- backport.yml: Backport merged PRs via korthout/backport-action
- docs-render.yml: Documentation rendering check
- php-quality.yml: Code quality (CS Fixer, PHPStan, XML lint)
- php-tests.yml: PHP test matrix (unit + integration)

All actions are SHA-pinned. Reusable workflows execute in this repo's
context, so only this repo's action allow-list needs maintenance.

Ref: TYPO3-Documentation/TYPO3CMS-Reference-CoreApi#6414
@CybotTM
Copy link
Copy Markdown
Contributor Author

CybotTM commented Mar 11, 2026

linawolf pushed a commit to TYPO3-Documentation/t3docs-ci-deploy that referenced this pull request Mar 13, 2026
Add centralized, reusable GitHub Actions workflows that can be called
by repositories across the TYPO3-Documentation organization:

- backport.yml: Backport merged PRs via korthout/backport-action
- docs-render.yml: Documentation rendering check
- php-quality.yml: Code quality (CS Fixer, PHPStan, XML lint)
- php-tests.yml: PHP test matrix (unit + integration)

All actions are SHA-pinned. Reusable workflows execute in this repo's
context, so only this repo's action allow-list needs maintenance.

Ref: TYPO3-Documentation/TYPO3CMS-Reference-CoreApi#6414
@CybotTM CybotTM changed the title [TASK] Demo: Migrate backport to shared reusable workflow [TASK] Migrate backport to shared reusable workflow Mar 13, 2026
@CybotTM
Copy link
Copy Markdown
Contributor Author

CybotTM commented Mar 13, 2026

Updated for merged TYPO3-Documentation/t3docs-ci-deploy#56

@CybotTM CybotTM force-pushed the demo/shared-backport-workflow branch 2 times, most recently from 7e42ec5 to 87fd201 Compare March 13, 2026 07:37
@linawolf
Copy link
Copy Markdown
Member

I moved your actions to Repo https://github.com/TYPO3-Documentation/.github as suggested by @jaapio and tried out using it like https://github.com/TYPO3-Documentation/TYPO3CMS-Tutorial-GettingStarted/blob/main/.github/workflows/backport.yml but did not get it to working yet. I would suggest we work on that repo as it is smaller and has less changes and trying out workflows there does not influence our daily work so much. After we have successfully tested the workflow we can try it out here

@linawolf linawolf marked this pull request as draft March 13, 2026 09:12
@CybotTM
Copy link
Copy Markdown
Contributor Author

CybotTM commented Mar 13, 2026

@linawolf ,

did you notice this comment:

Org admin action required: The org's GitHub Actions allow-list must permit reusable workflow calls to TYPO3-Documentation/t3docs-ci-deploy. This can be configured at Organization Settings > Actions > General. Without this, workflows referencing t3docs-ci-deploy reusable workflows will fail with startup_failure.

@linawolf
Copy link
Copy Markdown
Member

Let us continue in https://github.com/TYPO3-Documentation/TYPO3CMS-Tutorial-GettingStarted please. The repository we are currently in is to much frequented for experiments. Also, the reusable actions where moved to TYPO3-Documentation/.github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants