Skip to content

Commit

Permalink
build(fix): [#663] Aggregate Dependabot gomod updates
Browse files Browse the repository at this point in the history
  • Loading branch information
030 committed Dec 14, 2024
1 parent f4869d1 commit 3dcb3eb
Show file tree
Hide file tree
Showing 11 changed files with 421 additions and 152 deletions.
28 changes: 13 additions & 15 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
---
version: 2
updates:
- package-ecosystem: 'docker'
directory: '/'
reviewers:
- '030'
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: 'daily'
- package-ecosystem: 'github-actions'
directory: '/'
reviewers:
- '030'
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: 'daily'
- package-ecosystem: 'gomod'
directory: '/'
reviewers:
- '030'
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: 'daily'
interval: "weekly"
groups:
gomod-all:
patterns:
- "*"
14 changes: 11 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
---
name: Docker
'on': push
"on":
# required by gomod-go-version-updater to trigger this action once pr has
# been reviewed
pull_request_review:
types: [submitted]
push:
permissions:
contents: read
packages: write
jobs:
mcvs-docker-action:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.4
- uses: schubergphilis/mcvs-docker-action@v0.3.2
- uses: actions/checkout@v4.2.2
- uses: schubergphilis/mcvs-docker-action@v0.5.6
with:
dockle-accept-key: libcrypto3,libssl3
token: ${{ secrets.GITHUB_TOKEN }}
29 changes: 24 additions & 5 deletions .github/workflows/golang.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,36 @@
---
name: golang
'on':
name: Golang
"on":
# required by gomod-go-version-updater to trigger this action once pr has
# been reviewed
pull_request_review:
types: [submitted]
push:
permissions:
contents: read
packages: read
jobs:
mcvs-golang-action:
runs-on: ubuntu-20.04
strategy:
matrix:
testing-type:
- component
- coverage
- integration
- lint
- security-golang-modules
- security-grype
- security-trivy
- unit
runs-on: ubuntu-22.04
env:
TASK_X_REMOTE_TASKFILES: 1
steps:
- uses: actions/checkout@v4.1.4
- uses: schubergphilis/mcvs-golang-action@v0.4.1
- uses: actions/checkout@v4.2.2
- uses: schubergphilis/mcvs-golang-action@v0.15.0
with:
code-coverage-expected: 69.5
golang-unit-tests-exclusions: |-
\(cmd\/n3dr\|internal\/app\/n3dr\/\(goswagger\|n3drtest\)\)
testing-type: ${{ matrix.testing-type }}
token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/gomod-go-version-updater.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: gomod-go-version-updater-action
'on':
"on":
schedule:
- cron: '42 6 * * *'
- cron: "42 6 * * *"
permissions:
contents: write
pull-requests: write
jobs:
gomod-go-version-updater-action:
runs-on: ubuntu-22.04
steps:
- uses: 030/gomod-go-version-updater-action@v0.1.2
- uses: 030/gomod-go-version-updater-action@v0.2.2
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.task

*.log

cmd/n3dr/n3dr
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.2-alpine3.18 as builder
FROM golang:1.23.2-alpine3.18 as builder
ARG VERSION
ENV USERNAME n3dr
RUN adduser -D -g '' $USERNAME
Expand All @@ -9,7 +9,7 @@ RUN apk add --no-cache \
CGO_ENABLED=0 go build -ldflags "-X main.Version=${VERSION}" -buildvcs=false && \
cp n3dr /n3dr

FROM alpine:3.19.1
FROM alpine:3.20.2
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /n3dr /usr/local/bin/n3dr
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
Expand Down
57 changes: 10 additions & 47 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,13 @@
---
version: '3'
version: 3

env:
GIT_CHGLOG_URL: https://github.com/git-chglog/git-chglog/releases/download
GIT_CHGLOG_VERSION: v0.15.1/git-chglog_0.15.1_linux_amd64.tar.gz
CHANGELOG_NEXT_TAG: 7.5.2
vars:
REMOTE_URL: https://raw.githubusercontent.com
REMOTE_URL_REF: v0.15.3
REMOTE_URL_REPO: schubergphilis/mcvs-golang-action

tasks:
changelog:
cmds:
- |
git fetch -p -P
curl \
-L ${GIT_CHGLOG_URL}/${GIT_CHGLOG_VERSION} \
-o /tmp/git-chglog.tar.gz
tar -xvf /tmp/git-chglog.tar.gz -C /tmp
chmod +x /tmp/git-chglog
/tmp/git-chglog \
-o docs/CHANGELOG.md \
--config configs/chglog/config.yml \
--next-tag ${CHANGELOG_NEXT_TAG}
sed -i "s|\/\([0-9]\+\.\)\{2\}[0-9]\+|/${CHANGELOG_NEXT_TAG}|g" \
./docs/quickstarts/snippets/n3dr/DOWNLOAD.md
sed -i "s|version:.*|version: ${CHANGELOG_NEXT_TAG}|" \
./build/package/snap/snapcraft.yaml
integration-tests:
cmds:
- |
go test \
-coverprofile=coverage.cov \
--tags=integration \
-v \
-count=1 \
--cover \
-race \
-p=4 \
./...
go tool cover -func=coverage.cov > coverage-functions.out
go tool cover -html=coverage.cov -o coverage.html
open ./coverage.html
lint:
cmds:
- |
go install github.com/golangci/golangci-lint/cmd/[email protected]
~/go/bin/golangci-lint --version
~/go/bin/golangci-lint run \
-v \
--timeout 2m30s \
--config .golangci.yml
includes:
common:
taskfile: ./build/TaskfileCommon.yml
remote: >-
{{.REMOTE_URL}}/{{.REMOTE_URL_REPO}}/{{.REMOTE_URL_REF}}/Taskfile.yml
26 changes: 26 additions & 0 deletions build/TaskfileCommon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
version: "3"

vars:
GIT_CHGLOG_URL: https://github.com/git-chglog/git-chglog/releases/download
GIT_CHGLOG_VERSION: v0.15.1/git-chglog_0.15.1_linux_amd64.tar.gz
CHANGELOG_NEXT_TAG: 7.5.2

tasks:
changelog:
cmds:
- |
git fetch -p -P
curl \
-L {{.GIT_CHGLOG_URL}}/{{.GIT_CHGLOG_VERSION}} \
-o /tmp/git-chglog.tar.gz
tar -xvf /tmp/git-chglog.tar.gz -C /tmp
chmod +x /tmp/git-chglog
/tmp/git-chglog \
-o docs/CHANGELOG.md \
--config configs/chglog/config.yml \
--next-tag {{.CHANGELOG_NEXT_TAG}}
sed -i "s|\/\([0-9]\+\.\)\{2\}[0-9]\+|/{{.CHANGELOG_NEXT_TAG}}|g" \
./docs/quickstarts/snippets/n3dr/DOWNLOAD.md
sed -i "s|version:.*|version: {{.CHANGELOG_NEXT_TAG}}|" \
./build/package/snap/snapcraft.yaml
47 changes: 27 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ require (
github.com/go-openapi/swag v0.23.0
github.com/go-openapi/validate v0.24.0
github.com/go-playground/validator/v10 v10.19.0
github.com/hashicorp/go-retryablehttp v0.7.5
github.com/mholt/archiver/v3 v3.5.1
github.com/hashicorp/go-retryablehttp v0.7.7
github.com/mholt/archives v0.0.0-20241207175349-5e373c52f8aa
github.com/mitchellh/go-homedir v1.1.0
github.com/ory/dockertest/v3 v3.10.0
github.com/samber/lo v1.39.0
Expand All @@ -26,19 +26,24 @@ require (
)

require (
dario.cat/mergo v1.0.1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/andybalholm/brotli v1.0.6 // indirect
github.com/STARRY-S/zip v0.2.1 // indirect
github.com/andybalholm/brotli v1.1.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/bodgit/plumbing v1.3.0 // indirect
github.com/bodgit/sevenzip v1.6.0 // indirect
github.com/bodgit/windows v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/cli v20.10.24+incompatible // indirect
github.com/docker/docker v24.0.9+incompatible // indirect
github.com/docker/cli v25.0.6+incompatible // indirect
github.com/docker/docker v25.0.6+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/go-logr/logr v1.4.1 // indirect
Expand All @@ -54,33 +59,35 @@ require (
github.com/golang/snappy v0.0.4 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mholt/archiver/v4 v4.0.0-alpha.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
github.com/nwaples/rardecode v1.1.0 // indirect
github.com/nwaples/rardecode/v2 v2.0.0-beta.2 // indirect
github.com/nwaples/rardecode/v2 v2.0.0-beta.4.0.20241112120701-034e449c6e78 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.1.12 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sorairolake/lzip-go v0.3.5 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
Expand All @@ -91,24 +98,24 @@ require (
github.com/tidwall/gjson v1.14.4 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.14.0 // indirect
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 3dcb3eb

Please sign in to comment.