Template
The following template is what I created for creating a github pull request with @backstage/plugin-scaffolder-backend-module-github plugin. Then I want to register it to backstage.
- id: publish
name: Publish
action: publish:github:pull-request
input:
repoUrl: ${{ parameters.repoUrl }}
branchName: ${{ parameters.branch }}
title: "Scaffold new code into existing repo"
description: "Generated from Backstage template"
- id: register
name: Register
action: catalog:register
input:
repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
catalogInfoPath: '/catalog-info.yaml'
Catalog
The catalog-info.yaml is like:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: backstage
description: An example of a Backstage application.
spec:
type: website
owner: john@example.com
lifecycle: experimental
Problem
After I run the template to create a component, it got error when register to catalog:
2025-12-06T05:27:56.211Z Beginning step Fetch Base
2025-12-06T05:27:56.216Z info: Fetching template content from remote URL
2025-12-06T05:27:56.223Z info: Listing files and directories in template
2025-12-06T05:27:56.225Z info: Processing 3 template files/directories with input values {"name":"test3"}
2025-12-06T05:27:56.236Z info: Writing file catalog-info.yaml to template output path with mode 33188.
2025-12-06T05:27:56.238Z info: Writing file index.js to template output path with mode 33188.
2025-12-06T05:27:56.239Z info: Writing file package.json to template output path with mode 33188.
2025-12-06T05:27:56.240Z info: Template result written to /var/folders/nb/sxwmfr6s5r3fn1dc992jp4s00000gn/T/7672915b-0f75-4820-a493-a01dab070a3f
2025-12-06T05:27:56.243Z Finished step Fetch Base
2025-12-06T05:27:56.243Z Beginning step Publish
2025-12-06T05:28:00.542Z Finished step Publish
2025-12-06T05:28:00.545Z Beginning step Register
2025-12-06T05:28:00.555Z InputError: Invalid input passed to action catalog:register, instance is not any of [subschema 0],[subschema 1]
at NunjucksWorkflowRunner.executeStep (/Users/user1/test/backstage/backstage/node_modules/@backstage/plugin-scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts:342:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async NunjucksWorkflowRunner.execute (/Users/user1/test/backstage/backstage/node_modules/@backstage/plugin-scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts:522:9)
at async TaskWorker.runOneTask (/Users/user1/test/backstage/backstage/node_modules/@backstage/plugin-scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts:219:26)
at async run (/Users/user1/test/backstage/backstage/node_modules/p-queue/dist/index.js:163:29)
I have dumped the publish:github:pull-request's output, it has repoUrl but no repoContentsUrl. But even I tried to use repoUrl it still doesn't work.