> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Demo Community Plugins

> Guide to adding and configuring the GitHub Actions community plugin in Backstage, including frontend and backend installation, OAuth authentication, entity annotations, and UI integration.

This guide demonstrates how to add a Backstage community plugin to your instance and integrate it into an entity page. We use the GitHub Actions community plugin as an example and walk through:

* Locating the plugin in the Backstage community repository
* Installing frontend and backend packages
* Registering a backend provider for authentication
* Adding the plugin's UI to an entity page
* Annotating a component so the plugin can surface CI/CD data

## Finding the plugin

Community plugins are discoverable on the Backstage Plugins page and in the Backstage repository on GitHub. Searching for "GitHub Actions" leads you to the plugin folder and README in the [backstage/backstage/plugins](https://github.com/backstage/backstage/tree/master/plugins) area. Community plugins may include both frontend and backend packages (e.g., `plugin-name` and `plugin-name-backend`) or only frontend code. The GitHub Actions community plugin is primarily a frontend plugin but depends on backend auth/proxy support to perform authenticated requests.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/cTFshlV6LNi9HF-G/images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/github-actions-plugin-readme-fileview.jpg?fit=max&auto=format&n=cTFshlV6LNi9HF-G&q=85&s=db8cf52a7cc8eecdf5745ea163b6eead" alt="A screenshot of a GitHub repository file view showing a folder tree on the left and a list of files (including README.md, package.json, CHANGELOG.md) on the right for a &#x22;GitHub Actions Plugin&#x22; workspace. The README content for the plugin is visible in the lower right." width="1920" height="1080" data-path="images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/github-actions-plugin-readme-fileview.jpg" />
</Frame>

## Frontend-only plugins and backend proxies

Many frontend-only community plugins require a backend to handle authentication, hide API tokens, or proxy requests. For example, the Dynatrace plugin is a frontend app that uses a backend proxy to add API tokens server-side so tokens are never exposed in the browser.

Example: adding a Dynatrace tab to an entity (JSX):

```jsx theme={null}
// packages/app/src/components/catalog/EntityPage.tsx (example)
const serviceEntityPage = (
  <EntityLayout>
    [...]
    <EntityLayout.Route
      path="/dynatrace"
      title="Dynatrace"
      if={isDynatraceAvailable}
    >
      <DynatraceTab />
    </EntityLayout.Route>
  </EntityLayout>
);
```

Example proxy configuration (YAML) that forwards requests from the frontend to a backend proxy at `/dynatrace`, which adds the `Authorization` header using a backend environment variable:

```yaml theme={null}
proxy:
  endpoints:
    '/dynatrace':
      target: 'https://example.dynatrace.com/api/v2'
      headers:
        Authorization: 'Api-Token ${DYNATRACE_ACCESS_TOKEN}'

dynatrace:
  baseUrl: 'https://example.dynatrace.com'
```

## Installing the GitHub Actions plugin (frontend)

Install the frontend package inside your `packages/app` workspace:

```bash theme={null}
# From your Backstage root directory
yarn --cwd packages/app add @backstage-community/plugin-github-actions
```

This adds `@backstage-community/plugin-github-actions` to `packages/app/package.json` so the frontend can import the plugin components.

Example dependency excerpt from `packages/app/package.json`:

```json theme={null}
"dependencies": {
  "@backstage-community/plugin-github-actions": "^0.8.0",
  "@backstage/app-defaults": "^1.5.16",
  "@backstage/catalog-model": "^1.7.3",
  "@backstage/cli": "^0.29.5",
  "@backstage/core-app-api": "^1.15.4",
  "@backstage/core-components": "^0.16.3",
  "@backstage/core-plugin-api": "^1.10.3"
}
```

After installation, the plugin components are available under `@backstage-community/plugin-github-actions`.

## Quick commands and files

| Action                        | Command / File                                                                          |
| ----------------------------- | --------------------------------------------------------------------------------------- |
| Install frontend plugin       | `yarn --cwd packages/app add @backstage-community/plugin-github-actions`                |
| Install backend auth provider | `yarn --cwd packages/backend add @backstage/plugin-auth-backend-module-github-provider` |
| Frontend entity page          | `packages/app/src/components/catalog/EntityPage.tsx`                                    |
| Backend entrypoint            | `packages/backend/src/index.ts`                                                         |

## Back to the UI: the catalog and the entity page

Open your Backstage instance and navigate to the Software Catalog. Select a component (for example, "My Demo app"). Components include the Overview, CI/CD, Kubernetes, and other tabs. The GitHub Actions plugin renders CI/CD details on the CI/CD tab once configured.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/cTFshlV6LNi9HF-G/images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/backstage-company-catalog-components-table.jpg?fit=max&auto=format&n=cTFshlV6LNi9HF-G&q=85&s=7e22a7fe884016b576295d4157e6dc18" alt="A screenshot of the Backstage &#x22;My Company Catalog&#x22; web UI showing a searchable table of components (app1, app2, auth-service, etc.) with columns for owner, type, lifecycle, description and actions. A left sidebar shows navigation and filter options like Home, APIs, Docs and component kind/type." width="1920" height="1080" data-path="images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/backstage-company-catalog-components-table.jpg" />
</Frame>

Open the component page and check tabs and relations. This entity page is where you will add the GitHub Actions tab.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/cTFshlV6LNi9HF-G/images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/backstage-my-demo-app-relations-warning.jpg?fit=max&auto=format&n=cTFshlV6LNi9HF-G&q=85&s=759250b94b6b2085495eaf3b2e51cf42" alt="A screenshot of the Backstage software catalog page for a component named &#x22;my-demo-app,&#x22; showing the Overview tab with About and Relations panels and a warning about an entity relation not found. The left navigation, top header (owner: user:guest, lifecycle: experimental), and a small relations graph are also visible." width="1920" height="1080" data-path="images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/backstage-my-demo-app-relations-warning.jpg" />
</Frame>

## What the plugin shows

The GitHub Actions plugin queries workflow runs for the repository referenced by the component annotation. It displays recent runs, statuses, commit messages, and links to run details on GitHub—mirroring the information on a repository's Actions page.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/cTFshlV6LNi9HF-G/images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/github-actions-workflow-runs-screenshot.jpg?fit=max&auto=format&n=cTFshlV6LNi9HF-G&q=85&s=ca550191edfd50ea2d0e8c71dc919717" alt="A screenshot of a GitHub repository's Actions page showing a list of recent workflow runs (e.g., &#x22;Update catalog-info.yaml&#x22;, &#x22;Create test.yaml&#x22;) with status icons, branch labels, and timestamps. The left sidebar shows the Actions navigation menu." width="1920" height="1080" data-path="images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/github-actions-workflow-runs-screenshot.jpg" />
</Frame>

If an entity is missing CI/CD annotations, the CI/CD tab will show an empty state prompting you to add the required annotation.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/cTFshlV6LNi9HF-G/images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/backstage-my-demo-app-ci-cd.jpg?fit=max&auto=format&n=cTFshlV6LNi9HF-G&q=85&s=d8bea3297337a4bfe6c6d4a4d9354508" alt="A screenshot of the Backstage UI for a component called &#x22;my-demo-app,&#x22; showing the CI/CD tab with the message &#x22;No CI/CD available for this entity&#x22; and a &#x22;Read more&#x22; button. The left sidebar displays navigation items (Home, APIs, Docs, Create, Register) and decorative chart graphics appear on the right." width="1920" height="1080" data-path="images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/backstage-my-demo-app-ci-cd.jpg" />
</Frame>

## Adding the plugin UI to an entity page

Import the plugin components and add a route to your entity layout. Edit `packages/app/src/components/catalog/EntityPage.tsx` and insert the GitHub Actions route:

```tsx theme={null}
// In packages/app/src/components/catalog/EntityPage.tsx
import {
  EntityGithubActionsContent,
  isGithubActionsAvailable,
} from '@backstage-community/plugin-github-actions';

// Example: add a GitHub Actions tab to the service entity page
const serviceEntityPage = (
  <EntityLayout>
    {/* other tabs... */}
    <EntityLayout.Route
      path="/github-actions"
      title="GitHub Actions"
      if={isGithubActionsAvailable}
    >
      <EntityGithubActionsContent />
    </EntityLayout.Route>
  </EntityLayout>
);
```

The plugin exports an availability helper (`isGithubActionsAvailable`) to conditionally render the tab only for entities that include the required annotations.

You can also combine multiple CI/CD providers using `EntitySwitch` to show the correct provider or an empty state:

```tsx theme={null}
// packages/app/src/components/catalog/EntityPage.tsx (excerpt)
import { EntitySwitch } from '@backstage/plugin-catalog-react';
import { EntityGithubActionsContent, isGithubActionsAvailable } from '@backstage-community/plugin-github-actions';

const cicdContent = (
  <EntitySwitch>
    <EntitySwitch.Case if={isGithubActionsAvailable}>
      <EntityGithubActionsContent />
    </EntitySwitch.Case>

    <EntitySwitch.Case>
      <EmptyState
        title="No CI/CD available for this entity"
        missing="info"
        description="You need to add an annotation to your component if you want CI/CD information to appear."
      />
    </EntitySwitch.Case>
  </EntitySwitch>
);
```

## Handling authentication on the backend

Although the GitHub Actions plugin runs in the frontend, it requires authenticated GitHub API requests. Backstage handles OAuth and tokens on the backend using auth modules such as `@backstage/plugin-auth-backend-module-github-provider`.

Install the GitHub auth provider into your backend workspace:

```bash theme={null}
# From your Backstage root directory
yarn --cwd packages/backend add @backstage/plugin-auth-backend-module-github-provider
```

This will add the module to `packages/backend/package.json` dependencies:

```json theme={null}
"dependencies": {
  "@backstage/plugin-auth-backend": "^0.24.2",
  "@backstage/plugin-auth-backend-module-github-provider": "^0.3.0",
  "@backstage/plugin-auth-backend-module-guest-provider": "^0.2.4"
}
```

Register the provider in your backend entrypoint (`packages/backend/src/index.ts`) by adding it to the backend registry:

```ts theme={null}
// packages/backend/src/index.ts (excerpt)
import { createBackend } from '@backstage/backend-defaults';

const backend = createBackend();

backend.add(import('@backstage/plugin-app-backend'));
backend.add(import('@backstage/plugin-proxy-backend'));
backend.add(import('@backstage/plugin-scaffolder-backend'));
// ...
backend.add(import('@backstage/plugin-auth-backend'));
backend.add(import('@backstage/plugin-auth-backend-module-github-provider'));

// other backend plugins...
backend.start();
```

<Callout icon="lightbulb" color="#1CB2FE">
  After installing a backend package, you must both add it to `packages/backend/package.json` and register it in the backend `index.ts` with `backend.add(...)`, then restart your backend.
</Callout>

## Configuring GitHub OAuth and Backstage auth

Create a GitHub OAuth App under GitHub → Settings → Developer settings → OAuth Apps. Set the callback URL to Backstage’s OAuth handler, for local development:

`http://localhost:7007/api/auth/github/handler/frame`

Add the client ID and client secret to your Backstage configuration. For development you can add them to `app-config.yaml`; for production use environment variables or a secrets store.

Example `auth` section in `app-config.yaml`:

```yaml theme={null}
auth:
  providers:
    github:
      development:
        clientId: ${AUTH_GITHUB_CLIENT_ID}
        clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}
    guest: {}
```

After creating the OAuth app GitHub presents a client ID and lets you generate a client secret. Store these securely.

<Callout icon="warning" color="#FF6B6B">
  Do not commit OAuth client secrets to your repository. Use environment variables or a secrets manager (`AUTH_GITHUB_CLIENT_ID`, `AUTH_GITHUB_CLIENT_SECRET`) for production deployments.
</Callout>

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/cTFshlV6LNi9HF-G/images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/github-oauth-backstage-client-secret.jpg?fit=max&auto=format&n=cTFshlV6LNi9HF-G&q=85&s=fa33506928c06ec82794fc7ee922b64a" alt="A screenshot of the GitHub Developer settings for an OAuth application named &#x22;backstage.&#x22; It shows the client ID and a generated client secret along with buttons for transfer ownership, listing in the Marketplace, revoking tokens, and uploading an application logo." width="1920" height="1080" data-path="images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/github-oauth-backstage-client-secret.jpg" />
</Frame>

## Annotate your component with the repository project slug

To map a Backstage component to a GitHub repository, add the `github.com/project-slug` annotation to the component's `catalog-info.yaml`. The slug is typically `owner/repo` (for example, `backstage/backstage`).

Example `catalog-info.yaml` excerpt:

```yaml theme={null}
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: backstage
  description: backstage.io
  annotations:
    github.com/project-slug: 'backstage/backstage'
spec:
  type: website
  lifecycle: production
  owner: user:guest
```

Commit and push the updated `catalog-info.yaml`. Backstage will refresh the entity and, if correctly configured, the GitHub Actions tab will appear and show workflow runs for the annotated repository.

You can find the repository slug on the GitHub repo page.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/cTFshlV6LNi9HF-G/images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/github-repo-files-sidebar-screenshot.jpg?fit=max&auto=format&n=cTFshlV6LNi9HF-G&q=85&s=ef9bbe6b6e6f05f381a9bc5379f290f1" alt="A screenshot of a GitHub repository page for a demo app, showing a list of folders and files (e.g., .github/workflows, src, tests, package.json) in the main pane and repo details and language/activity stats in the right sidebar. The top navigation (Code, Issues, Pull requests, etc.) is also visible." width="1920" height="1080" data-path="images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/github-repo-files-sidebar-screenshot.jpg" />
</Frame>

## Using the plugin in Backstage

When you visit the component's CI/CD tab, the plugin will trigger an authentication prompt handled by the backend provider. After authorizing with GitHub, the plugin will list workflow runs and provide links to the GitHub run detail pages and step logs. The experience mirrors what you get in GitHub Actions but embedded inside Backstage.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/cTFshlV6LNi9HF-G/images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/github-actions-test-job-success-screenshot.jpg?fit=max&auto=format&n=cTFshlV6LNi9HF-G&q=85&s=6ae6966e8ff95d7f9a55ceff394d6849" alt="A screenshot of a GitHub Actions workflow run page showing a successful &#x22;test&#x22; job. The dark log pane lists steps like &#x22;Set up job&#x22;, &#x22;Checkout code&#x22;, &#x22;Setup Node.js&#x22; and &#x22;Post Setup Node.js&#x22;." width="1920" height="1080" data-path="images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/github-actions-test-job-success-screenshot.jpg" />
</Frame>

## Key takeaways

* Community plugins may be frontend-only or include backend parts. The repository structure clarifies which is which.
* Frontend plugins are installed into `packages/app`; backend plugins and auth modules go in `packages/backend`.
  * Example: `yarn --cwd packages/app add @backstage-community/plugin-github-actions`
  * Example: `yarn --cwd packages/backend add @backstage/plugin-auth-backend-module-github-provider`
* Backend modules must be registered with `backend.add(import('...'))` in `packages/backend/src/index.ts` and require a backend restart.
* Many frontend plugins rely on backend auth modules or proxies to keep API tokens secret.
* Annotate components with `github.com/project-slug: 'owner/repo'` to enable CI/CD data for that entity.

Plugins can render in multiple ways:

* A full-page plugin (own route)
* A tab inside an entity page (like CI/CD)
* A small card or block on an entity page

Explore the community plugins repository and each plugin’s README for provider-specific setup instructions.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/cTFshlV6LNi9HF-G/images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/backstage-docs-services-recommendation-shopping-cart.jpg?fit=max&auto=format&n=cTFshlV6LNi9HF-G&q=85&s=ecebcbaf46e7ecdf8166c6ac949d0e90" alt="A screenshot of the Backstage Documentation page showing a list of two services (recommendation-service and shopping-cart) with a left navigation menu, search bar, and filters." width="1920" height="1080" data-path="images/Prep-Course-Certified-Backstage-Associate-CBA-Certification/Customization-Plugins/Demo-Community-Plugins/backstage-docs-services-recommendation-shopping-cart.jpg" />
</Frame>

## Links and references

* Backstage plugins: [https://backstage.io/plugins](https://backstage.io/plugins)
* Backstage community plugins repository: [https://github.com/backstage/backstage/tree/master/plugins](https://github.com/backstage/backstage/tree/master/plugins)
* Backstage authentication docs: [https://backstage.io/docs/auth](https://backstage.io/docs/auth)
* GitHub OAuth apps: [https://github.com/settings/developers](https://github.com/settings/developers)

For further customization, consult the specific community plugin README and Backstage developer documentation.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/certified-backstage-associate-cba/module/aad867ea-baf2-4ca7-b722-ad38ea794a7e/lesson/1e3ae2bd-4bb1-4a35-b0af-8f7c5f2129f8" />
</CardGroup>
