ee92b179e1
* 'master' of github.com:backstage/backstage: (98 commits) build(deps): bump archiver from 5.0.2 to 5.1.0 build(deps): bump typescript-json-schema from 0.45.0 to 0.45.1 docs: Update lighthouse docs scaffolder-backend: clarify type detection error message scaffolder-backend: gitlab preparer uses integrations token core-api: ensure that routable extension components are discovered at boot core-api: memoize app element traversal and validation core-api: add lazy loading of component extensions Add changeset and add missing semicolon Add search plugin to new CLI created apps build(deps): bump graphql from 15.3.0 to 15.4.0 core-api: add MutableSessionManager and fix AuthSessionStore not properly updating session state run prettier on the roadmap core-api: refactor createReactExtension to forward component types directly and avoid @types/react dependency core-api: add route validation to app + test core-api: default type parameters for BackstagePlugin to avoid breakage changeset: add changesets for new plugin extension API core-api: avoid exporting AnyRoutes, AnyExternalRoutes, and ExternalRouteRef constructor core-api: rename BindRouteFunc to AppRouteBinder core-api,plugins/graphiql: export extension APIs from core-api and port the graphiql plugin ...
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: 'backstage/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