chore: add documentation and GA branding

This commit is contained in:
Jeroen de Bruijn 2020-03-20 22:02:25 +01:00
parent ad7537a1d2
commit 34953d657b
No known key found for this signature in database
GPG key ID: 7D12D6AB2A547EBB
4 changed files with 63 additions and 12 deletions

View file

@ -10,8 +10,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Renovate - name: Renovate example
uses: ./ uses: ./
with: with:
configurationFile: 'test/config.js' configurationFile: example/config.js
token: ${{ secrets.RENOVATE_TOKEN }} token: ${{ secrets.RENOVATE_TOKEN }}

View file

@ -7,6 +7,10 @@ GitHub Action to run Renovate self-hosted.
## Table of contents ## Table of contents
- [Badges](#badges) - [Badges](#badges)
- [Options](#options)
- [`configurationFile`](#option-configurationFile)
- [`token`](#option-token)
- [Example](#example)
- [License](#license) - [License](#license)
<a name="badges"></a> <a name="badges"></a>
@ -17,9 +21,53 @@ GitHub Action to run Renovate self-hosted.
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | -------------------- | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | -------------------- |
| <a href="https://github.com/prettier/prettier#readme"><img alt="code style" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a> | Code style | Prettier | | <a href="https://github.com/prettier/prettier#readme"><img alt="code style" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a> | Code style | Prettier |
| <a href="https://conventionalcommits.org"><img alt="Conventional Commits: 1.0.0" src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square"></a> | Commit style | Conventional Commits | | <a href="https://conventionalcommits.org"><img alt="Conventional Commits: 1.0.0" src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square"></a> | Commit style | Conventional Commits |
| <a href="https://renovatebot.com"><img alt="Renovate enabled" src="https://img.shields.io/badge/renovate-enabled-brightgreen.svg?style=flat-square"></a> | Dependencies | Renovate |
| <a href="https://github.com/vidavidorra/github-action-renovate/actions"><img alt="GitHub workflow status" src="https://img.shields.io/github/workflow/status/vidavidorra/github-action-renovate/Lint%20commit%20messages?style=flat-square"></a> | Lint commit messages | GitHub Actions | | <a href="https://github.com/vidavidorra/github-action-renovate/actions"><img alt="GitHub workflow status" src="https://img.shields.io/github/workflow/status/vidavidorra/github-action-renovate/Lint%20commit%20messages?style=flat-square"></a> | Lint commit messages | GitHub Actions |
| <a href="https://github.com/vidavidorra/github-action-renovate/actions"><img alt="GitHub workflow status" src="https://img.shields.io/github/workflow/status/vidavidorra/github-action-renovate/Lint?style=flat-square"></a> | Lint | GitHub Actions | | <a href="https://github.com/vidavidorra/github-action-renovate/actions"><img alt="GitHub workflow status" src="https://img.shields.io/github/workflow/status/vidavidorra/github-action-renovate/Lint?style=flat-square"></a> | Lint | GitHub Actions |
<a name="options"></a>
## Options
<a name="option-configurationFile"></a>
## `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.
<a name="option-token"></a>
## `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.
<a name="example"></a>
## 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 }}
```
<a name="license"></a> <a name="license"></a>
## License ## License

View file

@ -1,19 +1,22 @@
name: 'Self-Hosted Renovate' name: 'Self-Hosted Renovate'
description: 'GitHub Action to run self-hosted Renovate.' description: 'GitHub Action to run self-hosted Renovate.'
author: 'Jeroen de Bruijn' author: 'Jeroen de Bruijn'
branding:
icon: tool
color: blue
inputs: inputs:
configurationFile: configurationFile:
description: 'Renovate configuration file' description: 'Configuration file to configure Renovate'
required: false required: false
default: 'src/config.js' default: src/config.js
token: token:
description: | description: |
Personal access token that Renovate should use. This should be configured GitHub personal access token that Renovate should use. This should be
using a GitHub secret. configured using a Secret.
required: true required: true
runs: runs:
using: 'docker' using: docker
image: 'src/Dockerfile' image: src/Dockerfile
args: args:
- ${{ inputs.configurationFile }} - ${{ inputs.configurationFile }}
- ${{ inputs.token }} - ${{ inputs.token }}

View file

@ -1,9 +1,9 @@
module.exports = { module.exports = {
platform: 'github', branchPrefix: 'ga-renovate/',
logFileLevel: 'warn',
logLevel: 'debug',
onboarding: false,
dryRun: true, dryRun: true,
gitAuthor: 'Renovate Bot <bot@renovateapp.com>', gitAuthor: 'Renovate Bot <bot@renovateapp.com>',
logLevel: 'debug',
onboarding: false,
platform: 'github',
repositories: ['vidavidorra/github-action-renovate'], repositories: ['vidavidorra/github-action-renovate'],
}; };