From 21d312315579e08df65de2f1128fb094862b2906 Mon Sep 17 00:00:00 2001
From: Philippe Scorsolini
Date: Sat, 20 Apr 2024 11:13:34 +0100
Subject: [PATCH] ci: install go in the container
Signed-off-by: Philippe Scorsolini
---
.github/renovate.json5 | 1 +
.github/workflows/renovate.yml | 25 +------------------------
2 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/.github/renovate.json5 b/.github/renovate.json5
index 457c7909f42..6f006108944 100644
--- a/.github/renovate.json5
+++ b/.github/renovate.json5
@@ -135,6 +135,7 @@
// Post-upgrade tasks that are executed before a commit is made by Renovate.
"commands": [
"git submodule update --init",
+ "install-tool golang $(grep -oP '^go \\K.+' go.mod)",
"make generate"
],
fileFilters: ["**/*"],
diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml
index 5e15eaad9db..8cd2c77875f 100644
--- a/.github/workflows/renovate.yml
+++ b/.github/workflows/renovate.yml
@@ -25,29 +25,6 @@ jobs:
- name: Validate Renovate JSON
run: npx --yes --package renovate -- renovate-config-validator
- - name: Setup Go
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
- with:
- go-version: ${{ env.GO_VERSION }}
-
- - name: Find the Go Build Cache
- id: go
- run: echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT
-
- - name: Cache the Go Build Cache
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4
- with:
- path: ${{ steps.go.outputs.cache }}
- key: ${{ runner.os }}-build-check-diff-${{ hashFiles('**/go.sum') }}
- restore-keys: ${{ runner.os }}-build-check-diff-
-
- - name: Cache Go Dependencies
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4
- with:
- path: .work/pkg
- key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
- restore-keys: ${{ runner.os }}-pkg-
-
- name: Get token
id: get-github-app-token
uses: actions/create-github-app-token@7bfa3a4717ef143a604ee0a99d859b8886a96d00 # v1
@@ -61,8 +38,8 @@ jobs:
RENOVATE_REPOSITORIES: ${{ github.repository }}
# Use GitHub API to create commits
RENOVATE_PLATFORM_COMMIT: "true"
- RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git submodule update --init$", "^make generate$"]'
LOG_LEVEL: "debug"
+ RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git submodule update --init$", "^make generate$", "^install-tool golang \\$\\(grep -oP \'\\^go \\\\K\\.\\+\' go\\.mod\\)$"]'
with:
configurationFile: .github/renovate.json5
token: '${{ steps.get-github-app-token.outputs.token }}'