Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
.github: control tooling version used in CI via renovate
Browse files Browse the repository at this point in the history
Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
  • Loading branch information
paulfantom committed Feb 28, 2022
1 parent 3f31aca commit d7abe5d
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 39 deletions.
2 changes: 0 additions & 2 deletions .github/env

This file was deleted.

30 changes: 25 additions & 5 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,44 @@
],
"ignoreDeps": ["github.com/prometheus/prometheus"],
"dependencyDashboardLabels": ["dependencies"],
"labels": ["dependencies"],
"regexManagers": [
{
"fileMatch": ["^\\.github\\/workflows\\/[^/]+\\.ya?ml$"],
"matchStrings": ["golangci-lint-version:\\s(?<currentValue>.*?)\\n"],
"datasourceTemplate": "github-tags",
"depNameTemplate": "golangci/golangci-lint"
},
{
"fileMatch": ["^\\.github\\/workflows\\/[^/]+\\.ya?ml$"],
"matchStrings": ["helm-version:\\s(?<currentValue>.*?)\\n"],
"datasourceTemplate": "github-tags",
"depNameTemplate": "helm/helm"
},
{
"fileMatch": ["^\\.github\\/workflows\\/[^/]+\\.ya?ml$"],
"matchStrings": ["golang-version:\\s(?<currentValue>.*?)\\n"],
"datasourceTemplate": "golang-version",
"depNameTemplate": "golang"
}
],
"packageRules": [
{
"labels": ["helm", "dependencies"],
"addLabels": ["helm"],
"groupName": "helm charts",
"matchManagers": ["helmv3", "helm-values"]
},
{
"labels": ["go", "dependencies"],
"addLabels": ["go"],
"groupName": "golang",
"matchManagers": ["gomod"]
},
{
"labels": ["github_actions", "dependencies"],
"addLabels": ["github_actions"],
"groupName": "github actions",
"matchManagers": ["github-actions"]
"matchPaths": [".github/**"]
},
{
"labels": ["dependencies"],
"groupName": "docker-compose",
"matchManagers": ["docker-compose"]
}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/go-releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
pull_request:
branches: ['**']

env:
golang-version: 1.16.0

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand All @@ -20,9 +23,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV

-
name: Set up Go
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/go-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
schedule:
- cron: "6 0 * * *"

env:
golang-version: 1.16.0

jobs:

build:
Expand All @@ -19,9 +22,6 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: Set up Go ${{ env.golang-version }}
uses: actions/setup-go@v2.2.0
with:
Expand Down Expand Up @@ -49,10 +49,7 @@ jobs:
lfs: true

- name: Checkout LFS objects
run: git lfs checkout

- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV
run: git lfs checkout

- name: Set up Go ${{ env.golang-version }}
uses: actions/setup-go@v2.2.0
Expand Down Expand Up @@ -96,9 +93,6 @@ jobs:
- name: Checkout LFS objects
run: git lfs checkout

- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: Set up Go ${{ env.golang-version }}
uses: actions/setup-go@v2.2.0
with:
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
pull_request:
branches: ['**']

env:
golang-version: 1.16.0
golangci-lint-version: v1.42.1

jobs:
build:
name: Build and Lint
Expand All @@ -18,9 +22,6 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: Set up Go ${{ env.golang-version }}
uses: actions/setup-go@v2.2.0
with:
Expand Down Expand Up @@ -50,9 +51,6 @@ jobs:
- name: Checkout test data files
run: wget https://github.com/timescale/promscale-test-data/raw/main/traces-dataset.sz -O pkg/tests/testdata/traces-dataset.sz

- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: Set up Go ${{ env.golang-version }}
uses: actions/setup-go@v2.2.0
with:
Expand Down Expand Up @@ -109,9 +107,6 @@ jobs:
- name: Checkout test data files
run: wget https://github.com/timescale/promscale-test-data/raw/main/traces-dataset.sz -O pkg/tests/testdata/traces-dataset.sz

- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: Set up Go ${{ env.golang-version }}
uses: actions/setup-go@v2.2.0
with:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
pull_request:
branches: [master, main, force_test, release-*]

env:
helm-version: v3.7.1

jobs:
generate:
runs-on: ubuntu-latest
Expand All @@ -27,7 +30,7 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v2.0
with:
version: v3.7.1
version: ${{ env.helm-version }}

# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
# yamllint (https://github.com/adrienverge/yamllint) which require Python
Expand All @@ -38,8 +41,6 @@ jobs:

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.0
with:
version: v3.4.0

- name: Run chart-testing (list-changed)
id: list-changed
Expand Down Expand Up @@ -71,7 +72,7 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v2.0
with:
version: v3.7.1
version: ${{ env.helm-version }}

- name: Create package
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
pull_request:
branches: [master, main, force_test, release-*]

env:
golang-version: 1.16.0

jobs:
run:
runs-on: ubuntu-latest
Expand All @@ -25,9 +28,6 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: Set up Go ${{ env.golang-version }}
uses: actions/setup-go@v2.2.0
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/mixin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ on:
pull_request:
paths:
- 'docs/mixin/alerts/*.yml'

env:
golang-version: 1.16.0

jobs:
check-mixin:
runs-on: ubuntu-latest
name: Check monitoring mixin
steps:
- uses: actions/checkout@v2

- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: Set up Go ${{ env.golang-version }}
uses: actions/setup-go@v2.2.0
with:
Expand Down

0 comments on commit d7abe5d

Please sign in to comment.