Commit Graph

239 Commits

Author SHA1 Message Date
Bo-Yi Wu 23f0958c87 ci: pin golangci-lint to v2.11 2026-04-16 21:11:25 +08:00
Bo-Yi Wu c8c37942c1 ci: bump GitHub Actions and add Go 1.25/1.26 to test matrix 2026-04-16 21:03:32 +08:00
Bo-Yi Wu a7daa0df80 chore: bump go directive to 1.25.9 2026-04-16 20:58:04 +08:00
Bo-Yi Wu f3ace6f519 ci: add Trivy security scanning for source code and Docker image
- Add independent trivy.yml workflow with repo scan and image scan jobs
- Add Trivy image scan step in docker.yml before pushing Docker image
- Add security-events permission for SARIF upload
- Add Trivy Security Scan badge to README
2026-04-16 18:10:12 +08:00
Bo-Yi Wu 4de983b4ef fix(deps): upgrade golang.org/x/crypto to fix CVE vulnerabilities
- bump golang.org/x/crypto to v0.45.0 (fixes CVE-2024-45337 CRITICAL,
  CVE-2025-22869 HIGH, CVE-2025-47914 MEDIUM, CVE-2025-58181 MEDIUM)
- bump golang.org/x/sys to v0.38.0
2026-04-16 12:13:16 +08:00
Bo-Yi Wu b4a51bd6b6 ci(actions): upgrade GitHub Actions to latest versions
- bump actions/checkout to v6
- bump actions/setup-go to v6
- bump actions/cache to v5
- bump goreleaser/goreleaser-action to v7
- bump golangci/golangci-lint-action to v9
- bump github/codeql-action/* to v4
- bump codecov/codecov-action to v5
- bump docker/build-push-action to v7
- bump docker/login-action to v4
- bump docker/metadata-action to v6
- bump docker/setup-buildx-action to v4
- bump docker/setup-qemu-action to v4
- bump hadolint/hadolint-action to v3.3.0
- bump aquasecurity/trivy-action to v0.35.0
2026-04-16 12:06:53 +08:00
Bo-Yi Wu 30b9c501ff perf(plugin): hoist repeated work out of per-user loop
- Pre-render message templates before iterating users
- Pre-parse locations and venues before iterating users
- Inline trivial templateMessage wrapper into call site
- Extract escapeMarkdownFields variadic helper for bulk field escaping
- Use strings.TrimSpace instead of strings.Trim(" ") for robustness
- Pre-allocate slices in trimElement, escapeMarkdown, and globList
- Fix comment typo and inconsistent audio caption trailing period
2026-04-08 23:10:59 +08:00
Bo-Yi Wu cbae1a3737 chore: migrate golangci-lint config to v2
- Add version field and migrate to v2 config format
- Replace deprecated linters with modern equivalents
- Add new linters: bidichk, depguard, forbidigo, revive, testifylint, etc.
- Move gofmt, gofumpt, golines to formatters section
- Configure revive rules, depguard deny list, and exclusion presets
2026-04-08 23:00:38 +08:00
Bo-Yi Wu 0bc6220388 fix: resolve all golangci-lint issues
- Replace fmt.Printf with log.Printf to satisfy forbidigo
- Fix ineffectual assignment to err in proxy block by avoiding variable shadowing
- Format long lines with golines
- Use assert.Error/NoError instead of NotNil/Nil for error assertions
- Use assert.True/False instead of Equal for boolean assertions
- Use assert.Empty instead of Equal with len check
- Use require for mid-test error assertions that guard subsequent operations
- Add testify/require import
2026-04-08 22:47:32 +08:00
Bo-Yi Wu 8587a97ab1 refactor: simplify plugin code and fix minor issues
- Replace os.Open/bufio/io.ReadAll with os.ReadFile in loadTextFromFile
- Guard proxy URL parsing inside socks5 check to avoid false errors
- Remove redundant trimElement wrapping around globList calls
- Remove dead title assignment in convertLocation
- Switch Plugin methods to pointer receivers to avoid struct copying
- Use %w for error wrapping in fmt.Errorf calls
- Fix "unmarshall" typos to "unmarshal" in error messages
- Fix duplicate DIST variable and GXZ_PAGAGE typo in Makefile
2026-04-08 22:40:06 +08:00
Gianluca Boiano 893f3c30bf chore: add DOCS.md metadata for woodpecker plugins (#136) 2024-10-17 23:10:22 +08:00
appleboy 1f66667a65 ci: update Go version in workflow to 1.23
- Update the Go version in the workflow to include 1.23

Signed-off-by: appleboy <appleboy.tw@gmail.com>
v1.4.0
2024-09-06 16:03:56 +08:00
appleboy 47c90ae600 chore: update dependencies to latest versions
- Update the version of `dario.cat/mergo` to `v1.0.1`
- Remove `github.com/Masterminds/semver/v3` version `v3.2.1` and update to `v3.3.0`
- Remove `github.com/Masterminds/sprig/v3` version `v3.2.3` and update to `v3.3.0`
- Remove `github.com/imdario/mergo` version `v0.3.16`
- Update `golang.org/x/crypto` to version `v0.27.0`
- Update `golang.org/x/sys` to version `v0.25.0`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-09-06 15:59:58 +08:00
Bo-Yi Wu 65d453bece ci: enhance CI workflow with matrix testing and caching
- Replace the testing job with a more structured test job using a matrix strategy for different OS and Go versions.
- Update the Go setup action to version 5.
- Add caching for Go build and module paths to improve build performance.
- Include a step to check out the code with the specific GitHub reference.
- Remove the previous setup tools step and replace it with the new structure.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-08-14 23:10:22 +08:00
Bo-Yi Wu 45cfcd8bb1 chore: configure Goreleaser for multi-OS builds and hooks
- Add a new configuration file for Goreleaser
- Define build settings for multiple operating systems and architectures
- Specify hooks for pre- and post-build processes
- Include options for generating checksums and handling snapshots
- Set up changelog grouping for features, bug fixes, enhancements, and more

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-08-13 23:20:32 +08:00
Bo-Yi Wu a82484f5d7 docs: remove unnecessary badges from the README
- Remove build status badges from the README
- Delete Docker pulls badge from the README

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-08-13 23:18:14 +08:00
Bo-Yi Wu 4b48840e98 chore: upgrade Go version and linting container
- Update Go version from 1.20 to 1.22 in go.mod
- Change the linting container from golang:1.21-alpine to golang:1.22-alpine in the GitHub workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-08-13 23:17:00 +08:00
Bo-Yi Wu 3660832535 chore: remove gocyclo linter from project configuration
- Remove the gocyclo linter from the configuration

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-08-13 23:16:21 +08:00
Bo-Yi Wu 104ffc4fe7 chore: update Dockerfile and Hadolint configuration
- Add a new configuration file for Hadolint with specific ignored rules
- Change the Dockerfile maintainer label from SSH Plugin to Telegram Plugin
- Update the Dockerfile to remove the specific version of ca-certificates and install the latest version instead

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-08-13 23:14:25 +08:00
Bo-Yi Wu 80e7a36e5e ci: update CI workflows for improved build processes
- Update Docker workflow to use version 6 of the build-push-action
- Remove the build_linux_arm step from the Docker workflow
- Update Goreleaser workflow to use version 6 of the goreleaser-action
- Change the args in the Goreleaser workflow from release --rm-dist to release --clean
- Update lint workflow to use version 6 of the golangci-lint-action

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-08-13 23:13:51 +08:00
Bo-Yi Wu 6fdd0872fb chore: upgrade multiple dependencies to latest versions
- Update `github.com/urfave/cli` from version `1.22.14` to `1.22.15`
- Update `github.com/cpuguy83/go-md2man/v2` from version `2.0.3` to `2.0.4`
- Update `github.com/huandu/xstrings` from version `1.4.0` to `1.5.0`
- Update `github.com/shopspring/decimal` from version `1.3.1` to `1.4.0`
- Update `github.com/spf13/cast` from version `1.6.0` to `1.7.0`
- Update `golang.org/x/crypto` from version `0.21.0` to `0.26.0`
- Update `golang.org/x/sys` from version `0.18.0` to `0.24.0`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-08-13 23:12:18 +08:00
Bo-Yi Wu d0cc2a2774 refactor: refactor code and update linter config
- Add a new `.golangci.yml` configuration file with a list of enabled linters
- Exclude `lll` linter for lines starting with `//go:generate`
- Replace `strings.Replace` with `strings.ReplaceAll` in `plugin.go` for markdown escaping and error message sanitization
- Simplify time addition expressions in `plugin_test.go` by removing unnecessary `time.Duration` conversions

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-03-05 21:51:11 +08:00
Bo-Yi Wu 69c7f9efd1 chore: update dependencies and CI configurations
- Update `github.com/stretchr/testify` dependency from version `1.8.4` to `1.9.0`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-03-05 21:39:40 +08:00
Bo-Yi Wu 9d6dcccab5 ci: refactor CI workflows and update Go version management
- Update CodeQL GitHub Action from version 2 to version 3 in codeql.yml
- Replace static Go version with dynamic version from go.mod and enable check for latest Go version in goreleaser.yml
- Add Checkout repository step to lint.yml workflow
- Replace static Go version with dynamic version from go.mod and enable check for latest Go version in lint.yml workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-03-05 21:39:02 +08:00
Bo-Yi Wu 58c63ee76a ci: update GitHub Actions workflows to v4
- Update the GitHub Actions workflow to use version 4 of the `golangci-lint-action`
- Update the GitHub Actions workflow to use version 4 of the `codecov-action`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-03-05 21:37:56 +08:00
Bo-Yi Wu ce010e6672 chore: update dependencies to latest versions
- Update `github.com/google/uuid` dependency from `v1.5.0` to `v1.6.0`
- Upgrade `golang.org/x/crypto` from `v0.18.0` to `v0.21.0`
- Upgrade `golang.org/x/sys` from `v0.16.0` to `v0.18.0`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-03-05 21:36:27 +08:00
appleboy 3b9ad40520 chore: update dependencies to latest versions
- Update the version of `golang.org/x/crypto` to `v0.18.0`
- Update the version of `golang.org/x/sys` to `v0.16.0`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-12 21:24:30 +08:00
appleboy f103b43735 chore: update CodeQL initialization action to v3
- Update the CodeQL initialization action from v2 to v3

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2023-12-24 19:01:12 +08:00
appleboy 361d59920c chore: update dependencies in go.mod file
- Update the version of `github.com/google/uuid` from `v1.4.0` to `v1.5.0` in the `go.mod` file
- Update the version of `golang.org/x/crypto` from `v0.16.0` to `v0.17.0` in the `go.mod` file

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2023-12-24 18:58:08 +08:00
Bo-Yi Wu a77434ffeb chore: update dependencies to latest versions
- Update `github.com/google/uuid` from v1.3.1 to v1.4.0
- Update `github.com/spf13/cast` from v1.5.1 to v1.6.0
- Update `golang.org/x/crypto` from v0.14.0 to v0.16.0
- Update `golang.org/x/sys` from v0.13.0 to v0.15.0

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-12-12 20:43:48 +08:00
Bo-Yi Wu a8e9c83c55 chore: update actions to version 5 in relevant files
- Update the `setup-go` action from version 4 to version 5 in `docker.yml`
- Update the `docker/build-push-action` action from version 4 to version 5 in `docker.yml`
- Update the `setup-go` action from version 4 to version 5 in `goreleaser.yml`
- Update the `goreleaser/goreleaser-action` action from version 4 to version 5 in `goreleaser.yml`
- Update the `setup-go` action from version 4 to version 5 in `lint.yml`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-12-11 22:47:40 +08:00
Bo-Yi Wu 3c91807166 build: update container and package dependencies
- Change the container from `golang:1.19-alpine` to `golang:1.21-alpine`
- Add `build-base`, `zlib-dev`, and `ucl-dev` to the list of packages to be installed

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-25 15:58:58 +08:00
Bo-Yi Wu 8239f0f8b1 chore: add setup step for related tools in lint workflow
- Add a step to setup related tools in the lint workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-25 15:49:47 +08:00
Bo-Yi Wu de446823b7 refactor: refactor file handling to use os package
- Remove the import of `io/ioutil`
- Replace `ioutil.ReadFile` with `os.ReadFile`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-25 15:46:56 +08:00
Bo-Yi Wu d8db8b8eea chore: update docker/setup-qemu-action to version v3
- Update the version of `docker/setup-qemu-action` from `v2` to `v3`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-25 15:41:25 +08:00
Bo-Yi Wu 49d1464e69 refactor: refactor file handling and imports
- Change in main.go: Replaced `godotenv.Load(filename)` with `_ = godotenv.Load(filename)`
- Change in main.go: Replaced `godotenv.Overload("/run/drone/env")` with `_ = godotenv.Overload("/run/drone/env")`
- Change in plugin.go: Added import for "io"
- Change in plugin.go: Replaced `ioutil.ReadAll(r)` with `io.ReadAll(r)`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-25 15:40:16 +08:00
Bo-Yi Wu 99974ef0e7 chore: update docker/setup-buildx-action to v3
- Update the version of `docker/setup-buildx-action` from `v2` to `v3`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-25 15:38:51 +08:00
Bo-Yi Wu dc775b15ea chore: update workflow action versions
- Fix a typo in the cron expression for the codeql.yml workflow
- Update the version of the actions/checkout action in the codeql.yml workflow
- Update the version of the docker/login-action in the docker.yml workflow
- Update the version of the docker/metadata-action in the docker.yml workflow
- Update the version of the actions/checkout action in the goreleaser.yml workflow
- Update the version of the actions/checkout action in the lint.yml workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-25 15:36:36 +08:00
Bo-Yi Wu 571987a1f0 chore: update dependencies in go.mod file
- Update the version of Go to 1.20 in the go.mod file
- Update the version of github.com/appleboy/drone-template-lib to v1.3.0 in the go.mod file
- Update the version of github.com/joho/godotenv to v1.5.1 in the go.mod file
- Update the version of github.com/stretchr/testify to v1.8.4 in the go.mod file
- Update the version of github.com/urfave/cli to v1.22.14 in the go.mod file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-25 10:50:56 +08:00
Bo-Yi Wu 92b96294c4 build: add GitHub workflows and Dockerfile
- Add a new file `.github/FUNDING.yml`
- Add a new file `.github/dependabot.yml`
- Add a new file `.github/workflows/codeql.yml`
- Add a new file `.github/workflows/docker.yml`
- Add a new file `.github/workflows/goreleaser.yml`
- Add a new file `.github/workflows/lint.yml`
- Add a new file `docker/Dockerfile`
- Delete the file `docker/Dockerfile.linux.amd64`
- Delete the file `docker/Dockerfile.linux.arm`
- Delete the file `docker/Dockerfile.linux.arm64`
- Delete the file `docker/Dockerfile.windows.amd64`
- Delete the file `docker/manifest.tmpl`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-25 10:47:34 +08:00
Bo-Yi Wu 81d4eb4d8f chore: remove unnecessary configuration files
- Deleted file: `.appveyor.yml`
- Deleted file: `.drone.jsonnet`
- Deleted file: `.drone.yml`
- Deleted file: `.editorconfig`
- Deleted file: `.revive.toml`
- Deleted file: `pipeline.libsonnet`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-25 10:42:46 +08:00
Alex 8ca83919d2 fix: {{since build.started}} does not reflect the actual build time in a p… (#114) 2023-10-25 07:27:16 +08:00
Bo-Yi Wu ab44454733 chore: remove trim \n from message (#105) 2021-07-12 15:17:02 +08:00
Bo-Yi Wu 2dfbc98fdd chore: remove badge
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-07-03 12:46:47 +08:00
Bo-Yi Wu 24f5558e9e chore: update go module
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-07-03 12:46:31 +08:00
Bo-Yi Wu ca270b33c8 Fix can't call duration helper func (#104)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-07-03 12:39:54 +08:00
Bo-Yi Wu 882afee629 chore: upgrade drone template (#103) 2021-07-03 11:56:16 +08:00
Bo-Yi Wu d5d27734b0 chore: revert to go1.15 v1.3.9 2021-04-03 07:08:13 +08:00
Bo-Yi Wu e0f4e9a9e4 chore: upgrade go module 2021-04-03 06:54:55 +08:00
Bo-Yi Wu d6c3514a66 chore: upgrade to go1.16 2021-04-03 06:39:46 +08:00