Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Added a Quick Start Guide to README #828

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
66 changes: 65 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ GitHub Action to run Renovate self-hosted.
<a name="toc"></a>

## Table of contents

- [Badges](#badges)
- [Quick Start](#quick-start)
- [Options](#options)
- [`configurationFile`](#configurationfile)
- [`docker-cmd-file`](#docker-cmd-file)
Expand Down Expand Up @@ -36,6 +36,70 @@ GitHub Action to run Renovate self-hosted.
| <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/renovatebot/github-action/actions"><img alt="GitHub workflow status" src="https://img.shields.io/github/actions/workflow/status/renovatebot/github-action/build.yml?style=flat-square"></a> | Build | GitHub Actions |

## Quick Start
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As noted, it might be worth adding the word GitHub here -- possibly with other words (Workflow, "using a"?)

Suggested change
## Quick Start
## Quick Start with a GitHub Workflow


### `Step 1: Renovate Explained`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't call this a step.

Renovate is a nifty tool for automatically updating your projects dependencies so you don't have to manually! Lets go through how to setup a GitHub Action for Renovate.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Renovate is a nifty tool for automatically updating your projects dependencies so you don't have to manually! Lets go through how to setup a GitHub Action for Renovate.
Renovate is a nifty tool for automatically updating your projects dependencies so you don't have to manually! Let's go through how to set up a GitHub Action for Renovate.


### `Step 2: Generate Personal Access Token (PAT)`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I'd number the steps. I think it's better to just have an outline that links to named steps

Generate Personal Access Token (PAT)

-- I also wouldn't use backticks around these things.

We must generate a PAT for Renovate in order for it to be able to interact with your GitHub.

1. Go to your GitHub settings.
2. Navigate to Developer settings (the very bottom) and then select Personal access tokens (Tokens (classic)).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could link directly to

Generate new token (classic)
and
Generate new token, Fine-grained/repo-scoped

Note that both work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should link to https://docs.renovatebot.com/modules/platform/github/ there as some more about auth for github.

but you can also use the action to run agains other platforms 😉

3. Click `Generate new token`.
4. Choose the 'repo' category at the top.
5. Click `Generate token` at the bottom (and save it for later).

### `Step 3: Add Your PAT as a Secret in Your Repo`
Now we add the PAT you created as a secret in your GitHub repo.

1. Go to your repository.
2. Navigate to Settings -> Secrets -> Actions.
3. Click `New repository secret.`
4. Name your secret `RENOVATE_TOKEN` and paste your PAT in the value field.
5. Click `Add secret`.

### `Step 4: Create renovate.json`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, not required step. renovate will onboard all accessable repos by default.

Renovate requires this .json file so lets setup a basic one.

1. Create `renovate.json` in the base of your repo.
2. Specify a base configuration:

```json
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"]
}
```
### `Step 5: Set Up GitHub Action Workflow`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### `Step 5: Set Up GitHub Action Workflow`
### `Step 5: Set Up GitHub Action Workflow`

Here we need to setup the yaml for your Github Action Workflow.

1. Make a new directory in your repo titled `.github/workflows`.
2. Inside your new directory create a file `renovate.yml`.
3. Define the workflow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disable autodiscover and set repo explicit or set autodiscover filter for security reasons!


```yaml
name: Renovate

on:
schedule:
- cron: '0 3 * * *'

jobs:
renovate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Renovate
uses: renovatebot/github-action@v40.0.3
with:
token: ${{ secrets.RENOVATE_TOKEN }}

```

this sets up your workflow to run at 3am daily (editable) which is when Renovate will check your dependencies for updates.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this sets up your workflow to run at 3am daily (editable) which is when Renovate will check your dependencies for updates.
This sets up your workflow to run at 3am daily (editable) which is when Renovate will check your dependencies for updates.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for the suggestions guys! I will follow them all and update my PR when I'm back from vacation next week.


## Options

Options can be passed using the inputs of this action or the corresponding environment variables.
Expand Down