diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1016eada..469b0350 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,6 +52,10 @@ jobs: e2e: needs: [cleanup] runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + configurationFile: [example/renovate-config.js, example/renovate.json] steps: - name: Checkout uses: actions/checkout@v2.1.0 @@ -62,8 +66,9 @@ jobs: - name: Renovate test uses: ./ with: - configurationFile: example/renovate-config.js + configurationFile: ${{ matrix.configurationFile }} token: ${{ secrets.RENOVATE_TOKEN }} + build: needs: [lint, commitlint, e2e] runs-on: ubuntu-latest diff --git a/README.md b/README.md index 18e37cf7..515efa4d 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,11 @@ GitHub Action to run Renovate self-hosted. - [Badges](#badges) - [Options](#options) - - [`configurationFile`](#option-configurationFile) - - [`token`](#option-token) + - [`configurationFile`](#configurationfile) + - [`token`](#token) - [Example](#example) - [License](#license) - - ## Badges | Badge | Description | Service | @@ -25,15 +23,13 @@ GitHub Action to run Renovate self-hosted. | GitHub workflow status | Build | 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. +Configuration file to configure Renovate. The supported configurations files can be one of the configuration files listed in the Renovate Docs for [Configuration Options](https://docs.renovatebot.com/configuration-options/) or a JavaScript file that exports a configuration object. For both of these options, an example can be found in the [example](./example) directory. + +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. 1. [Self-Hosted Configuration Options](https://docs.renovatebot.com/self-hosted-configuration/) 2. [Configuration Options](https://docs.renovatebot.com/configuration-options/) @@ -47,16 +43,12 @@ If you want to use this with just the single configuration file, make sure to in requireConfig: false, ``` - - ## `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. @@ -78,6 +70,6 @@ jobs: - name: Self-hosted Renovate uses: renovatebot/github-action@v1.0.0 with: - configurationFile: example/config.js + configurationFile: example/renovate-config.js token: ${{ secrets.RENOVATE_TOKEN }} ``` diff --git a/example/renovate.json b/example/renovate.json new file mode 100644 index 00000000..dd8a5ab4 --- /dev/null +++ b/example/renovate.json @@ -0,0 +1,29 @@ +{ + "branchPrefix": "test-renovate/", + "dryRun": true, + "gitAuthor": "Renovate Bot ", + "logLevel": "debug", + "onboarding": false, + "platform": "github", + "includeForks": true, + "repositories": [ + "renovatebot/github-action", + "renovate-tests/cocoapods1", + "renovate-tests/gomod1" + ], + "packageRules": [ + { + "description": "lockFileMaintenance", + "updateTypes": [ + "pin", + "digest", + "patch", + "minor", + "major", + "lockFileMaintenance" + ], + "masterIssueApproval": false, + "stabilityDays": 0 + } + ] +}