Skip to content

Commit

Permalink
ci: improve trunk flow (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serpentiel authored Feb 28, 2024
1 parent a51aaa1 commit 3cfc91b
Show file tree
Hide file tree
Showing 15 changed files with 211 additions and 545 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ jobs:
(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) ||
github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/trunk_upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Upgrade Trunk

on:
schedule:
- cron: 0 8 * * 1-5
workflow_dispatch: {}

permissions: read-all

jobs:
trunk-upgrade:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: trunk-io/trunk-action/upgrade@v1
with:
prefix: "ci(deps): "
lowercase-title: true
8 changes: 0 additions & 8 deletions .markdownlint.json

This file was deleted.

3 changes: 2 additions & 1 deletion .trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
*logs
*actions
*notifications
*tools
plugins
user_trunk.yaml
user.yaml
shims
tmp
File renamed without changes.
5 changes: 5 additions & 0 deletions .trunk/configs/.markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
default: true
MD013:
line_length: 120
code_blocks: false
tables: false
3 changes: 0 additions & 3 deletions .trunk/configs/.yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ rules:
quoted-strings:
required: only-when-needed
extra-allowed: ["{|}"]
empty-values:
forbid-in-block-mappings: true
forbid-in-flow-mappings: true
key-duplicates: {}
octal-values:
forbid-implicit-octal: true
45 changes: 29 additions & 16 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,45 @@
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
version: 1.8.1
version: 1.20.1
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
- id: trunk
ref: v0.0.16
ref: v1.4.3
uri: https://github.com/trunk-io/plugins
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/clearruntimes)
runtimes:
enabled:
- [email protected]
- [email protected]
- [email protected]
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
enabled:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- git-diff-check
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
ignore:
- linters: [markdownlint]
- linters:
- markdownlint
paths:
- .github/**
- LICENSE.md
- CHANGELOG.md
runtimes:
enabled:
- [email protected]
- [email protected]
- [email protected]
- LICENSE.md
- linters:
- checkov
paths:
- internal/assets/.arikawa-boilerplate.example.yaml
actions:
enabled:
- trunk-announce
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// rootCmd is the rootCmd command for the application.
var rootCmd = &cobra.Command{
Use: "arikawa-boilerplate",
Run: func(cmd *cobra.Command, args []string) {
Run: func(cmd *cobra.Command, _ []string) {
fx.New(
fx.Supply(cmd),

Expand Down
63 changes: 32 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,57 +1,58 @@
module github.com/Serpentiel/arikawa-boilerplate

go 1.19
go 1.21

require (
github.com/eko/gocache/lib/v4 v4.1.2
go.uber.org/zap v1.24.0
golang.org/x/text v0.7.0
golang.org/x/time v0.3.0
github.com/eko/gocache/lib/v4 v4.1.5
go.uber.org/zap v1.27.0
golang.org/x/text v0.14.0
golang.org/x/time v0.5.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/golang/glog v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/gorilla/schema v1.2.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/gorilla/schema v1.2.1 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.39.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // 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
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
go.uber.org/dig v1.16.1 // indirect
golang.org/x/sys v0.5.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/dig v1.17.1 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.17.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require (
github.com/dgraph-io/ristretto v0.1.1
github.com/diamondburned/arikawa/v3 v3.2.0
github.com/eko/gocache/store/ristretto/v4 v4.1.2
github.com/diamondburned/arikawa/v3 v3.3.5
github.com/eko/gocache/store/ristretto/v4 v4.2.1
github.com/gertd/go-pluralize v0.2.1
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.15.0
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/fx v1.19.1
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/exp v0.0.0-20230212135524-a684f29349b6
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/fx v1.20.1
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
gopkg.in/natefinch/lumberjack.v2 v2.2.1
)
Loading

0 comments on commit 3cfc91b

Please sign in to comment.