From 131f62484356b5d0a1a4f4e03e2788cf69463b70 Mon Sep 17 00:00:00 2001 From: dependabot-ci Date: Fri, 15 Sep 2023 15:36:13 +0100 Subject: [PATCH] (fix) use correct arm runner --- .drone.yml | 22 +++++++++++----------- go.mod | 12 +++++++----- go.sum | 8 -------- plugin.go | 4 ++-- 4 files changed, 20 insertions(+), 26 deletions(-) diff --git a/.drone.yml b/.drone.yml index 67fd512..48fff73 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,7 +9,7 @@ pool: steps: - name: lint - image: golang:1.19 + image: golang:1.20 pull: always commands: - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest @@ -19,7 +19,7 @@ steps: - name: gopath path: "/go" - name: test - image: golang:1.19 + image: golang:1.20 commands: - go test -cover ./... volumes: @@ -46,7 +46,7 @@ pool: steps: - name: environment - image: golang:1.19 + image: golang:1.20 pull: always environment: CGO_ENABLED: "0" @@ -54,7 +54,7 @@ steps: - go version - go env - name: build - image: golang:1.19 + image: golang:1.20 environment: CGO_ENABLED: "0" commands: @@ -80,7 +80,7 @@ trigger: --- kind: pipeline -type: docker +type: vm name: linux-arm64 platform: os: linux @@ -90,7 +90,7 @@ pool: steps: - name: environment - image: golang:1.19 + image: golang:1.20 pull: always environment: CGO_ENABLED: "0" @@ -98,7 +98,7 @@ steps: - go version - go env - name: build - image: golang:1.19 + image: golang:1.20 environment: CGO_ENABLED: "0" commands: @@ -134,7 +134,7 @@ pool: steps: - name: environment - image: golang:1.19 + image: golang:1.20 pull: always environment: CGO_ENABLED: "0" @@ -142,7 +142,7 @@ steps: - go version - go env - name: build - image: golang:1.19 + image: golang:1.20 environment: CGO_ENABLED: "0" commands: @@ -184,7 +184,7 @@ pool: steps: - name: environment - image: golang:1.19 + image: golang:1.20 pull: always environment: CGO_ENABLED: "0" @@ -192,7 +192,7 @@ steps: - go version - go env - name: build - image: golang:1.19 + image: golang:1.20 environment: CGO_ENABLED: "0" commands: diff --git a/go.mod b/go.mod index 3ce2fe2..7b48e5c 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,17 @@ module github.com/drone-plugins/drone-webhook +require ( + github.com/drone/drone-template-lib v0.0.0-20181004051823-4019baa6c594 + github.com/joho/godotenv v1.3.0 + github.com/urfave/cli v1.20.0 +) + require ( bou.ke/monkey v1.0.1 // indirect github.com/aymerick/raymond v2.0.2+incompatible // indirect - github.com/drone/drone-template-lib v0.0.0-20181004051823-4019baa6c594 - github.com/joho/godotenv v1.3.0 github.com/pkg/errors v0.8.1 // indirect - github.com/stretchr/testify v1.3.0 // indirect github.com/tkuchiki/faketime v0.1.1 // indirect - github.com/urfave/cli v1.20.0 gopkg.in/yaml.v2 v2.2.2 // indirect ) -go 1.13 +go 1.20 diff --git a/go.sum b/go.sum index d80552a..5720fff 100644 --- a/go.sum +++ b/go.sum @@ -2,24 +2,16 @@ bou.ke/monkey v1.0.1 h1:zEMLInw9xvNakzUUPjfS4Ds6jYPqCFx3m7bRmG5NH2U= bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg= github.com/aymerick/raymond v2.0.2+incompatible h1:VEp3GpgdAnv9B2GFyTvqgcKvY+mfKMjPOA3SbKLtnU0= github.com/aymerick/raymond v2.0.2+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/drone/drone-template-lib v0.0.0-20181004051823-4019baa6c594 h1:zPRVfiHpXeGt1XGpK2TQcaj2lRydiGdVz1AoHkaC554= github.com/drone/drone-template-lib v0.0.0-20181004051823-4019baa6c594/go.mod h1:u34woe41m58Whrf21iH6z/xLOIRM3650LhWAyUc7Oik= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/tkuchiki/faketime v0.1.1 h1:UZjBlktFAi23wo+jWuHuNoHUpLnB0j/5B62bl5nCPls= github.com/tkuchiki/faketime v0.1.1/go.mod h1:RXY/TXAwGGL36IKDjrHFMcjpUrEiyWSEtLhFPw3UWF0= github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/plugin.go b/plugin.go index a74d7f5..8de9084 100644 --- a/plugin.go +++ b/plugin.go @@ -8,7 +8,7 @@ import ( "encoding/hex" "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "net/url" "os" @@ -169,7 +169,7 @@ func (p Plugin) Exec() error { defer resp.Body.Close() if p.Config.Debug || resp.StatusCode >= http.StatusBadRequest { - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { fmt.Printf("Error: Failed to read the HTTP response body. %s\n", err)