Skip to content

Commit 7b9ad7e

Browse files
committed
.github: switch to renovate to reduce noise
Signed-off-by: Christian Stewart <christian@paral.in>
1 parent 0c22318 commit 7b9ad7e

File tree

5 files changed

+71
-17
lines changed

5 files changed

+71
-17
lines changed

.github/dependabot.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
schedule:
1010
- cron: '41 13 * * 6'
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
analyze:
1417
name: Analyze
@@ -22,16 +25,19 @@ jobs:
2225
fail-fast: false
2326
matrix:
2427
language: [ 'go' ]
25-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
26-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
2728

2829
steps:
30+
- name: Harden Runner
31+
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
32+
with:
33+
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
34+
2935
- name: Checkout repository
30-
uses: actions/checkout@v3
36+
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
3137

3238
# Initializes the CodeQL tools for scanning.
3339
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v2
40+
uses: github/codeql-action/init@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2.2.7
3541
with:
3642
languages: ${{ matrix.language }}
3743
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -45,7 +51,7 @@ jobs:
4551
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4652
# If this step fails, then you should remove it and run the build manually (see below)
4753
- name: Autobuild
48-
uses: github/codeql-action/autobuild@v2
54+
uses: github/codeql-action/autobuild@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2.2.7
4955

5056
# ℹ️ Command-line programs to run using the OS shell.
5157
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -58,4 +64,4 @@ jobs:
5864
# ./location_of_script_within_repo/buildscript.sh
5965

6066
- name: Perform CodeQL Analysis
61-
uses: github/codeql-action/analyze@v2
67+
uses: github/codeql-action/analyze@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2.2.7
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
4+
#
5+
# Source repository: https://github.com/actions/dependency-review-action
6+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7+
name: 'Dependency Review'
8+
on: [pull_request]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
dependency-review:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Harden Runner
18+
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
19+
with:
20+
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
21+
22+
- name: 'Checkout Repository'
23+
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
24+
- name: 'Dependency Review'
25+
uses: actions/dependency-review-action@f46c48ed6d4f1227fb2d9ea62bf6bcbed315589e # v3.0.4

.github/workflows/tests.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,26 @@ on:
88
branches: [ "master" ]
99

1010
# Builds images for target boards.
11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
tests:
1316
runs-on: ubuntu-latest
1417
strategy:
1518
matrix:
16-
go: ['1.19']
19+
go: ['1.20']
20+
node: [16.x]
1721
timeout-minutes: 10
1822
steps:
19-
- uses: actions/checkout@v3
23+
- name: Harden Runner
24+
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
25+
with:
26+
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
27+
28+
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
2029
- name: Setup Go ${{ matrix.go }}
21-
uses: actions/setup-go@v3
30+
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
2231
with:
2332
go-version: ${{ matrix.go }}
2433
# Cache go build cache, used to speedup go test
@@ -28,16 +37,17 @@ jobs:
2837
echo "::set-output name=go-build::$(go env GOCACHE)"
2938
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
3039
- name: Go Build Cache
31-
uses: actions/cache@v3
40+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
3241
with:
3342
path: ${{ steps.go-cache-paths.outputs.go-build }}
3443
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
3544
# Cache go mod cache, used to speedup builds
3645
- name: Go Mod Cache
37-
uses: actions/cache@v3
46+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
3847
with:
3948
path: ${{ steps.go-cache-paths.outputs.go-mod }}
4049
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
50+
4151
- name: Vendor Go
4252
run: go mod vendor
4353
- name: Test Go

renovate.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
":dependencyDashboard",
5+
":semanticPrefixFixDepsChoreOthers",
6+
":ignoreModulesAndTests",
7+
"group:all",
8+
"workarounds:all"
9+
],
10+
"branchConcurrentLimit": 0,
11+
"postUpdateOptions": ["gomodMassage"],
12+
"packageRules": [{
13+
"matchManagers": ["gomod"],
14+
"matchDepTypes": ["replace"],
15+
"enabled": false
16+
}],
17+
"forkProcessing": "enabled",
18+
"includeForks": true
19+
}

0 commit comments

Comments
 (0)