06f410cc93
* 'master' of github.com:spotify/backstage: (34 commits) TechDocs Backend: Replace hardcoded github api by configuration value (#3004) fix: accordion details design for job stage failure (#3014) fix: responsive of page example in storybook (#3005) fix: update the ItemCard component and it's story (#3007) rename stories folder to Chip (#3009) feat: Display the plugins InfoCards on EntityPage Overwiev suitable full height (#2826) fix(cost-insights): More exports to help custom alerting chore(scaffolder): bump rjsf remove unused CSS (#2999) feat: update github pull requests package version fix(github-actions): fix crash when viewing ongoing workflows fix(cli): removePlugin forgotten await catalog-backend: relations db review comments and more tests Feat/add aws lambda plugin (#2985) chore(deps): bump object-path from 0.11.4 to 0.11.5 (#2983) add changeset fix CodeSnippet test case warnings fix CopyTextButton test case warnings fix the warning by wrapping in act fix(catalog): fix link to techdocs ...
GitHub Actions Plugin
Website: https://github.com/actions
Screenshots
TBD
Setup
Generic Requirements
-
Provide OAuth credentials:
- Create an OAuth App with callback URL set to
http://localhost:7000/api/auth/github. - Take Client ID and Client Secret from the newly created app's settings page and put them into
AUTH_GITHUB_CLIENT_IDandAUTH_GITHUB_CLIENT_SECRETenv variables.
- Create an OAuth App with callback URL set to
-
Annotate your component with a correct GitHub Actions repository and owner:
The annotation key is
github.com/project-slug.Example:
apiVersion: backstage.io/v1alpha1 kind: Component metadata: name: backstage description: backstage.io annotations: github.com/project-slug: 'spotify/backstage' spec: type: website lifecycle: production owner: guest
Standalone app requirements
If you didn't clone this repo you have to do some extra work.
- Add plugin API to your Backstage instance:
yarn add @backstage/plugin-github-actions
// packages/app/src/api.ts
import { ApiRegistry } from '@backstage/core';
import { GithubActionsClient, githubActionsApiRef } from '@backstage/plugin-github-actions';
const builder = ApiRegistry.builder();
builder.add(githubActionsApiRef, new GithubActionsClient());
export default builder.build() as ApiHolder;
- Add plugin itself:
// packages/app/src/plugins.ts
export { plugin as GithubActions } from '@backstage/plugin-github-actions';
- Run the app with
yarn startand the backend withyarn --cwd packages/backend start, navigate to/github-actions/.
Features
- List workflow runs for a project
- Dive into one run to see a job steps
- Retry runs
- Pagination for runs
Limitations
- There is a limit of 100 apps for one OAuth client/token pair