From 8dd44ed4d79361135781532565b9650cb8b98b81 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Mon, 8 Apr 2024 16:11:15 -0500 Subject: [PATCH] Corrected example Signed-off-by: Andre Wanlin --- .../software-templates/builtin-actions.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/features/software-templates/builtin-actions.md b/docs/features/software-templates/builtin-actions.md index 53819f67ce..94b2d2298b 100644 --- a/docs/features/software-templates/builtin-actions.md +++ b/docs/features/software-templates/builtin-actions.md @@ -17,13 +17,21 @@ There are also several modules available for various SCM tools: - Bitbucket Server: `@backstage/plugin-scaffolder-backend-module-bitbucket-server` - Gerrit: `@backstage/plugin-scaffolder-backend-module-gerrit` - Gitea: `@backstage/plugin-scaffolder-backend-module-gitea` +- GitHub: `@backstage/plugin-scaffolder-backend-module-github` - GitLab: `@backstage/plugin-scaffolder-backend-module-gitlab` ## Installing Action Modules -Here's how to add an action module, this is a simplified new backend system for example purposes: +Here's how to add an action module, first you need to run this command: -```ts title="/packages/backend/src/index.ts +```sh +# From your Backstage root directory +yarn --cwd packages/backend add @backstage/plugin-scaffolder-backend-module-github +``` + +Then you need to add it to your backend, this is a simplified new backend system for example purposes: + +```ts title="/packages/backend/src/index.ts" import { createBackend } from '@backstage/backend-defaults'; const backend = createBackend(); @@ -41,7 +49,7 @@ backend.add(import('@backstage/plugin-scaffolder-backend/alpha')); { /* highlight-add-start */ } -backend.add(import('@backstage/plugin-scaffolder-backend-module-azure')); +backend.add(import('@backstage/plugin-scaffolder-backend-module-github')); { /* highlight-add-end */ } @@ -49,6 +57,8 @@ backend.add(import('@backstage/plugin-scaffolder-backend-module-azure')); backend.start(); ``` +> Note: This is a simplified example of what your backend may look like, you may have more code in here then this. + ## Listing Actions A list of all registered actions can be found under `/create/actions`. For local