diff --git a/.github/workflows/example-basic.yml b/.github/workflows/example.yml similarity index 76% rename from .github/workflows/example-basic.yml rename to .github/workflows/example.yml index 7d979d3e..706ccf5a 100644 --- a/.github/workflows/example-basic.yml +++ b/.github/workflows/example.yml @@ -10,8 +10,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Renovate + - name: Renovate example uses: ./ with: - configurationFile: 'test/config.js' + configurationFile: example/config.js token: ${{ secrets.RENOVATE_TOKEN }} diff --git a/README.md b/README.md index 45a51c9e..1ceb71a1 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ GitHub Action to run Renovate self-hosted. ## Table of contents - [Badges](#badges) +- [Options](#options) + - [`configurationFile`](#option-configurationFile) + - [`token`](#option-token) +- [Example](#example) - [License](#license) @@ -17,9 +21,53 @@ GitHub Action to run Renovate self-hosted. | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | -------------------- | | 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 | + + +## 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 `public_repo` rights for only public repositories or `repo` rights for public and private repositories, and add it to _Secrets_ (repository settings) as `RENOVATE_TOKEN`. The name of the secret can be anything as long as it matches the argument given to the `token` option. + + + +## Example + +This example uses a personal access token that is a Secret named `RENOVATE_TOKEN`. + +```yml +name: Example +on: push +jobs: + example: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Self-hosted Renovate example + uses: vidavidorra/github-action-renovate@v1.0.0 + with: + configurationFile: example/config.js + token: ${{ secrets.RENOVATE_TOKEN }} +``` + ## License diff --git a/action.yml b/action.yml index 1215d99e..0001c948 100644 --- a/action.yml +++ b/action.yml @@ -1,19 +1,22 @@ name: 'Self-Hosted Renovate' description: 'GitHub Action to run self-hosted Renovate.' author: 'Jeroen de Bruijn' +branding: + icon: tool + color: blue inputs: configurationFile: - description: 'Renovate configuration file' + description: 'Configuration file to configure Renovate' required: false - default: 'src/config.js' + default: src/config.js token: description: | - Personal access token that Renovate should use. This should be configured - using a GitHub secret. + GitHub personal access token that Renovate should use. This should be + configured using a Secret. required: true runs: - using: 'docker' - image: 'src/Dockerfile' + using: docker + image: src/Dockerfile args: - ${{ inputs.configurationFile }} - ${{ inputs.token }} diff --git a/test/config.js b/example/config.js similarity index 86% rename from test/config.js rename to example/config.js index 7bacce75..b2b824ac 100644 --- a/test/config.js +++ b/example/config.js @@ -1,9 +1,9 @@ module.exports = { - platform: 'github', - logFileLevel: 'warn', - logLevel: 'debug', - onboarding: false, + branchPrefix: 'ga-renovate/', dryRun: true, gitAuthor: 'Renovate Bot ', + logLevel: 'debug', + onboarding: false, + platform: 'github', repositories: ['vidavidorra/github-action-renovate'], };