Skip to content

Commit

Permalink
Use Renovate as version "manager" (#8)
Browse files Browse the repository at this point in the history
* Move renovate.json to .github and adopt better practices

Using my own gist at
https://gist.github.com/paulo-ferraz-oliveira/68e04915037d1e78eb815a90f491f97d

* Prepare for proper Renovate updates
  • Loading branch information
paulo-ferraz-oliveira authored Jun 7, 2024
1 parent 884a0b6 commit b84c816
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 21 deletions.
58 changes: 58 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:best-practices"
],
"packageRules": [
{
"matchFileNames": [
".github/**/*.yml",
".tool-versions"
],
"groupName": "dev tools"
},
{
"matchFileNames": [
"rebar.config"
],
"groupName": "rebar.config deps"
},
{
"matchFileNames": [
"package.json",
".nvmrc"
],
"groupName": "package.json + .nvmrc deps"
},
{
"matchPackagePrefixes": [
"minimum_otp_vsn"
],
"enabled": false
}
],
"customManagers": [
{
"description": "Match versions (per datasource and depName) in .github/**/*.yml",
"customType": "regex",
"fileMatch": [
".github/.*/.*\\.yml"
],
"matchStrings": [
"# renovate datasource: (?<datasource>[^,]+), depName: (?<depName>[^\\n]+)\\n.+?(?<currentValue>v?\\d+(\\.\\d+(\\.\\d+)?)?)\\n"
]
},
{
"description": "Match versions in rebar.config",
"customType": "regex",
"fileMatch": [
"rebar.config"
],
"datasourceTemplate": "hex",
"matchStrings": [
"{(?<depName>[^,]+), \"(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)\""
],
"versioningTemplate": "semver"
}
]
}
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,26 @@ jobs:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
# renovate datasource: github-runners, depName: ubuntu
- ubuntu-20.04
# renovate datasource: github-runners, depName: macos
- macos-12

runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.6

- name: parse-tool-versions
uses: paulo-ferraz-oliveira/parse-tool-versions@v1
uses: paulo-ferraz-oliveira/parse-tool-versions@v1.0.3
id: tool-versions

- name: nodejs
uses: actions/setup-node@v3
uses: actions/setup-node@v4.0.2
with:
node-version: ${{steps.tool-versions.outputs.nodejs}}

- name: plugin-test
uses: asdf-vm/actions/plugin-test@v2
uses: asdf-vm/actions/plugin-test@v3.0.2
with:
command: markdownlint-cli2 _version
18 changes: 9 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,45 @@ name: Lint

jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.6

- name: install
uses: asdf-vm/actions/install@v2
uses: asdf-vm/actions/install@v3.0.2

- name: lint.bash
run: scripts/lint.bash

actionlint:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.6

- name: Check workflow files
uses: docker://rhysd/actionlint:1.6.23
with:
args: -color

build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.6

# uses .markdownlint.yml for configuration
- name: markdownlint
uses: DavidAnson/markdownlint-cli2-action@v11
uses: DavidAnson/markdownlint-cli2-action@v16.0.0
with:
globs: |
.github/**/*.md
*.md
LICENSE
- name: yamllint
uses: ibiqlik/action-yamllint@v3
uses: ibiqlik/action-yamllint@v3.1.1
with:
file_or_dir: |
.github/workflows/*.yml
Expand Down
6 changes: 0 additions & 6 deletions renovate.json

This file was deleted.

0 comments on commit b84c816

Please sign in to comment.