releaser-pleaser/docs/reference/github-action.md
Ferdinand Hofherr 0f42c753a8
feat: make forge configurable in GitHub Action
Forgejo actions are a near drop-in replacement for GitHub actions. This
commit changes the action.yml file to make the forge configurable. This
allows using the action with forgejo instances.

Changes made:

- Introduce a `forge` input and pass it as the value of the `--forge`
  flag.
- Introduce `api-url` input and pass it as the value of the `--api-url`
  flag. This is required to configure the API URL of the forge. If the
  action is used with GitHub Actions it is simply ignored.
- Pass `inputs.token` as value to the `--api-token` flag. This is
  required as the forgejo client does not respect the `GITHUB_ACTION`
  environment variable.
- Introduce `owner` input and pass it as the value of the `--owner`
  flag. As this was not passed before the default is set to `""`. In
  theory it could be set to the value of `github.repository_owner`.
- Introduce `user` input and pass it as the value of the `--user`
  flag. As this was not passed before the default is set to `""`. GitHub
  Actions does not seem to provide a convenient way to get the
  repository without the owner. As such keeping it at `""` for the
  default is safest.
2026-01-25 15:20:30 +01:00

3.4 KiB

GitHub Action

Reference

The action is available as apricote/releaser-pleaser on GitHub.com.

Versions

The apricote/releaser-pleaser action is released together with releaser-pleaser and they share the version number.

The action does not support floating tags (e.g. v1) right now (#31). You have to use the full version or commit SHA instead: apricote/releaser-pleaser@v0.2.0.

Inputs

The following inputs are supported by the apricote/releaser-pleaser GitHub Action.

Input Description Default Example
branch This branch is used as the target for releases. main master
token GitHub token for creating and updating release PRs $GITHUB_TOKEN ${{secrets.RELEASER_PLEASER_TOKEN}}
forge Forge this action is run against github forgejo
extra-files List of files that are scanned for version references by the generic updater. ""
version/version.go
deploy/deployment.yaml
updaters List of updaters that are run. Default updaters can be removed by specifying them as -name. Multiple updaters should be concatenated with a comma. Default Updaters: changelog,generic "" -generic,packagejson
api-url API URL of the forge this action is run against. "" https://forgejo.example.com
owner Owner of the repository. Only required for Forgejo Actions. "" apricote
repo Name of the repository. Only required for Forgejo Actions. "" releaser-pleaser

Outputs

The action does not define any outputs.