# GitHub Action Renovate GitHub Action to run Renovate self-hosted. ## Table of contents - [Badges](#badges) - [Options](#options) - [`configurationFile`](#option-configurationFile) - [`token`](#option-token) - [Example](#example) - [License](#license) ## Badges | Badge | Description | Service | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | -------------------- | | code style | Code style | Prettier | | Conventional Commits: 1.0.0 | Commit style | Conventional Commits | | Renovate enabled | Dependencies | Renovate | | GitHub workflow status | Lint commit messages | GitHub Actions | | GitHub workflow status | Lint | GitHub Actions | | GitHub workflow status | Example | GitHub Actions | ## Options ## `configurationFile` Configuration file to configure Renovate. The configurations that can be done in this file consists of two parts, as listed below. Refer to the links to the [Renovate Docs](https://docs.renovatebot.com/) for all options and see the [`example/config.js`](./example/config.js) for an example configuration. 1. [Self-Hosted Configuration Options](https://docs.renovatebot.com/self-hosted-configuration/) 2. [Configuration Options](https://docs.renovatebot.com/configuration-options/) The [`branchPrefix`](https://docs.renovatebot.com/configuration-options/#branchprefix) option is important to configure and should be configured to a value other than the default to prevent interference with e.g. the Renovate GitHub App. ## `token` [Generate a personal access token](https://github.com/settings/tokens), with the `repo:public_repo` scope for only public repositories or the `repo` scope for public and private repositories, and add it to _Secrets_ (repository settings) as `RENOVATE_TOKEN`. You can also create a token without a specific scope, which gives read-only access to public repositories, for testing. This token is only used by Renovate, see the [token configuration](https://docs.renovatebot.com/self-hosted-configuration/#token), and gives it access to the repositories. The name of the secret can be anything as long as it matches the argument given to the `token` option. Note that the [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token) secret can't be used for authenticating Renovate. ## Example This example uses a personal access token and will run every 15 minutes. The personal access token is configured as a GitHub secret named `RENOVATE_TOKEN`. This example uses the [`example/config.js`](./example/config.js) file as configuration. You can also see a live example of this action in my [github-renovate](https://github.com/vidavidorra/github-renovate) repository, which also includes a more [advanced configuration](https://github.com/vidavidorra/github-renovate/blob/master/src/config.js) for updating GitHub Action workflows. ```yml name: Renovate on: schedule: # The "*" (#42, asterisk) character has special semantics in YAML, so this # string has to be quoted. - cron: '0/15 * * * *' jobs: renovate: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2.0.0 - name: Self-hosted Renovate uses: vidavidorra/github-action-renovate@v1.0.0 with: configurationFile: example/config.js token: ${{ secrets.RENOVATE_TOKEN }} ```