From cdedbc0e8a3163e56980417bcdcc9498e79d5457 Mon Sep 17 00:00:00 2001 From: Noel Georgi Date: Tue, 16 Jan 2024 11:31:27 +0530 Subject: [PATCH] chore: update make help text Updates `make help` text with a better aggressive buildx caching example. Fixes: https://github.com/siderolabs/pkgs/issues/866 Also updates dependencies. Signed-off-by: Noel Georgi --- Dockerfile | 6 +++--- Makefile | 19 ++++++++++++++++++- go.mod | 2 +- go.sum | 4 ++-- internal/config/constants.go | 10 +++++----- internal/output/github/github.go | 2 +- internal/project/common/makehelp.go | 21 +++++++++++++++++++-- internal/project/common/repository.go | 2 +- 8 files changed, 50 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7fae2c2..623c76f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2023-12-08T16:10:53Z by kres c42e995-dirty. +# Generated on 2024-01-16T06:01:05Z by kres 6e83212-dirty. ARG TOOLCHAIN @@ -11,9 +11,9 @@ FROM ghcr.io/siderolabs/ca-certificates:v1.6.0 AS image-ca-certificates FROM ghcr.io/siderolabs/fhs:v1.6.0 AS image-fhs # runs markdownlint -FROM docker.io/node:21.4.0-alpine3.18 AS lint-markdown +FROM docker.io/node:21.5.0-alpine3.19 AS lint-markdown WORKDIR /src -RUN npm i -g markdownlint-cli@0.37.0 +RUN npm i -g markdownlint-cli@0.38.0 RUN npm i sentences-per-line@0.2.1 COPY .markdownlint.json . COPY ./README.md ./README.md diff --git a/Makefile b/Makefile index e7671e3..546b28e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-01-12T13:58:52Z by kres 0e666ea-dirty. +# Generated on 2024-01-16T06:01:05Z by kres 6e83212-dirty. # common variables @@ -88,6 +88,23 @@ To create a builder instance, run: docker buildx create --name local --use +If running builds that needs to be cached aggresively create a builder instance with the following: + + docker buildx create --name local --use --config=config.toml + +config.toml contents: + +[worker.oci] + gc = true + gckeepstorage = 50000 + + [[worker.oci.gcpolicy]] + keepBytes = 10737418240 + keepDuration = 604800 + filters = [ "type==source.local", "type==exec.cachemount", "type==source.git.checkout"] + [[worker.oci.gcpolicy]] + all = true + keepBytes = 53687091200 If you already have a compatible builder instance, you may use that instead. diff --git a/go.mod b/go.mod index 5c811d0..79df888 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21.6 require ( github.com/drone/drone-yaml v1.2.3 github.com/go-git/go-git/v5 v5.11.0 - github.com/google/go-github/v57 v57.0.0 + github.com/google/go-github/v58 v58.0.0 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/siderolabs/gen v0.4.7 github.com/spf13/cobra v1.8.0 diff --git a/go.sum b/go.sum index f504203..244a6a5 100644 --- a/go.sum +++ b/go.sum @@ -68,8 +68,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-github/v57 v57.0.0 h1:L+Y3UPTY8ALM8x+TV0lg+IEBI+upibemtBD8Q9u7zHs= -github.com/google/go-github/v57 v57.0.0/go.mod h1:s0omdnye0hvK/ecLvpsGfJMiRt85PimQh4oygmLIxHw= +github.com/google/go-github/v58 v58.0.0 h1:Una7GGERlF/37XfkPwpzYJe0Vp4dt2k1kCjlxwjIvzw= +github.com/google/go-github/v58 v58.0.0/go.mod h1:k4hxDKEfoWpSqFlc8LTpGd9fu2KrV1YAa6Hi6FmDNY4= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= diff --git a/internal/config/constants.go b/internal/config/constants.go index dba9811..f059daa 100644 --- a/internal/config/constants.go +++ b/internal/config/constants.go @@ -36,10 +36,10 @@ const ( DockerfileFrontendImageVersion = "1.6.0-labs" // DownloadArtifactActionVersion is the version of download artifact github action. // renovate: datasource=github-releases extractVersion=^(?v\d+)\.\d+\.\d+$ depName=actions/download-artifact - DownloadArtifactActionVersion = "v3" + DownloadArtifactActionVersion = "v4" // GitHubScriptActionVersion is the version of github script action. // renovate: datasource=github-releases extractVersion=^(?v\d+)\.\d+\.\d+$ depName=actions/github-script - GitHubScriptActionVersion = "v6" + GitHubScriptActionVersion = "v7" // GoFmtVersion is the version of gofmt. // renovate: datasource=go depName=github.com/mvdan/gofumpt GoFmtVersion = "v0.5.0" @@ -66,10 +66,10 @@ const ( LoginActionVersion = "v3" // MardownLintCLIVersion is the version of markdownlint. // renovate: datasource=npm depName=markdownlint-cli - MardownLintCLIVersion = "0.37.0" + MardownLintCLIVersion = "0.38.0" // NodeContainerImageVersion is the default node container image. // renovate: datasource=docker versioning=docker depName=node - NodeContainerImageVersion = "21.4.0-alpine3.18" + NodeContainerImageVersion = "21.5.0-alpine3.19" // PkgsVersion is the version of pkgs. // renovate: datasource=github-tags depName=siderolabs/pkgs PkgsVersion = "v1.6.0" @@ -93,7 +93,7 @@ const ( SlackNotifyActionVersion = "v1" // UploadArtifactActionVersion is the version of upload artifact github action. // renovate: datasource=github-releases extractVersion=^(?v\d+)\.\d+\.\d+$ depName=actions/upload-artifact - UploadArtifactActionVersion = "v3" + UploadArtifactActionVersion = "v4" // VTProtobufVersion is the version of vtprotobuf. // renovate: datasource=go depName=github.com/planetscale/vtprotobuf VTProtobufVersion = "v0.5.0" diff --git a/internal/output/github/github.go b/internal/output/github/github.go index 7aacf66..27fb213 100644 --- a/internal/output/github/github.go +++ b/internal/output/github/github.go @@ -10,7 +10,7 @@ import ( "fmt" "os" - "github.com/google/go-github/v57/github" + "github.com/google/go-github/v58/github" "golang.org/x/oauth2" ) diff --git a/internal/project/common/makehelp.go b/internal/project/common/makehelp.go index f451b6b..242a886 100644 --- a/internal/project/common/makehelp.go +++ b/internal/project/common/makehelp.go @@ -26,7 +26,7 @@ func NewMakeHelp(meta *meta.Options) *MakeHelp { meta: meta, - MenuHeader: defaultMenuHader, + MenuHeader: defaultMenuHeader, } } @@ -44,7 +44,7 @@ func (help *MakeHelp) CompileMakefile(output *makefile.Output) error { return nil } -const defaultMenuHader = `# Getting Started +const defaultMenuHeader = `# Getting Started To build this project, you must have the following installed: @@ -62,6 +62,23 @@ To create a builder instance, run: docker buildx create --name local --use +If running builds that needs to be cached aggresively create a builder instance with the following: + + docker buildx create --name local --use --config=config.toml + +config.toml contents: + +[worker.oci] + gc = true + gckeepstorage = 50000 + + [[worker.oci.gcpolicy]] + keepBytes = 10737418240 + keepDuration = 604800 + filters = [ "type==source.local", "type==exec.cachemount", "type==source.git.checkout"] + [[worker.oci.gcpolicy]] + all = true + keepBytes = 53687091200 If you already have a compatible builder instance, you may use that instead. diff --git a/internal/project/common/repository.go b/internal/project/common/repository.go index 01fa665..bcac550 100644 --- a/internal/project/common/repository.go +++ b/internal/project/common/repository.go @@ -10,7 +10,7 @@ import ( "net/http" "sort" - "github.com/google/go-github/v57/github" + "github.com/google/go-github/v58/github" "github.com/siderolabs/gen/xslices" "github.com/siderolabs/kres/internal/config"