-
Notifications
You must be signed in to change notification settings - Fork 84
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -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) | ||||||||
|
@@ -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 | ||||||||
|
||||||||
### `Step 1: Renovate Explained` | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
### `Step 2: Generate Personal Access Token (PAT)` | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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)). | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could link directly to Generate new token (classic) Note that both work. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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` | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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` | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
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 | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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/[email protected] | ||||||||
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. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||||||||
|
There was a problem hiding this comment.
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"?)