New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@backstage/plugin-scaffolder-backend-module-gitea

Package Overview
Dependencies
Maintainers
3
Versions
383
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@backstage/plugin-scaffolder-backend-module-gitea

The gitea module for @backstage/plugin-scaffolder-backend

  • 0.2.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

scaffolder-backend-module-gitea

Welcome to the publish:gitea action of the scaffolder-gitea-backend.

Getting started

To use this action, you will have to add the package using the following command to be executed at the root of your backstage project:

yarn --cwd packages/backend add @backstage/plugin-scaffolder-backend-module-gitea

Alternatively, if you use the new backend system, then register it like this:

// packages/backend/src/index.ts
backend.add(import('@backstage/plugin-scaffolder-backend-module-gitea'));

Configure the action (if not yet done): (you can check the docs to see all options):

Before to create a template, include to your app-config.yaml file the gitea host and credentials under the integrations: section

integrations:
  gitea:
    - host: gitea.com
      username: '<GITEA_USER>'
      password: '<GITEA_PASSWORD>'
    - host: localhost:3333
      username: '<GITEA_LOCALHOST_USER>'
      password: '<GITEA_LOCALHOST_PASSWORD>'

Important: As backstage will issue HTTPS/TLS requests to the gitea instance, it is needed to configure gitea with a valid certificate or at least with a self-signed certificate gitea cert --host localhost -ca trusted by a CA authority. Don't forget to set the env var NODE_EXTRA_CA_CERTS to point to the CA file before launching backstage or you can set temporarily NODE_TLS_REJECT_UNAUTHORIZED=0 but this is not recommended for production!

When done, you can create a template which:

  • Declare the RepoUrlPicker within the spec/parameters section to select the gitea host and to provide the name of the repository
  • Add an enum list allowing the user to define the visibility about the repository to be created: public or private. If this field is omitted, public is then used by the action.
  • Include in a step the action: publish:gitea

Warning: The list of the allowedOwners of the repoUrlPicker must match the list of the organizations which are available on the gitea host !

kind: Template
metadata:
  name: simple-gitea-project
  title: Create a gitea repository
  description: Create a gitea repository
spec:
  owner: guests
  type: service

  parameters:
    - title: Choose a location
      required:
        - repoUrl
      properties:
        repoUrl:
          title: Repository Location
          type: string
          ui:field: RepoUrlPicker
          ui:options:
            allowedOwners:
              - qteam
              - qshift
            allowedHosts:
              - gitea.localtest.me:3333

        repoVisibility:
          title: Visibility of the repository
          type: string
          default: 'public'
          enum:
            - 'public'
            - 'private'
          enumNames:
            - 'public'
            - 'private'

  steps:
    ...
    - id: publish
      name: Publishing to a gitea git repository
      action: publish:gitea
      input:
        description: This is ${{ parameters.repoUrl | parseRepoUrl | pick('repo') }}
        repoVisibility: ${{ parameters.repoVisibility }}
        repoUrl: ${{ parameters.repoUrl }}
        defaultBranch: main

Access the newly gitea repository created using the repoContentsUrl ;-)

FAQs

Package last updated on 18 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc