diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f82c151..2db7713 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -44,7 +44,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22 + go-version: 1.23 - name: Run tests run: pushd src && go test -v -race -covermode=atomic -coverprofile=coverage.out ./... && popd diff --git a/Dockerfile b/Dockerfile index d7f7191..1ad1e45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Specify the version of Go to use -FROM golang:1.22 +FROM golang:1.23 # set envs ENV TEMPLATES_DIR=/src/templates diff --git a/action.yml b/action.yml index 35b048a..29145bc 100644 --- a/action.yml +++ b/action.yml @@ -28,7 +28,7 @@ outputs: description: 'JSON object with the status of deployment by K8S environment' runs: using: docker - image: docker://mpespiritosanto/k8s-deploy:2.2.2 + image: docker://mpespiritosanto/k8s-deploy:2.2.3 args: - ${{ inputs.k8s_envs }} - ${{ inputs.manifest_dir }} diff --git a/slim.dockerfile b/slim.dockerfile index 617e31b..bf58433 100644 --- a/slim.dockerfile +++ b/slim.dockerfile @@ -3,7 +3,7 @@ # # Specify the version of Go to use -FROM golang:1.22-bullseye AS builder +FROM golang:1.23-bookworm AS builder # Install upx (upx.github.io) to compress the compiled action RUN apt-get update && apt-get --no-install-recommends -y install upx && rm -rf /var/lib/apt/lists/* diff --git a/src/go.mod b/src/go.mod index 522d074..dead0ec 100644 --- a/src/go.mod +++ b/src/go.mod @@ -1,14 +1,16 @@ module k8s-deploy -go 1.22 +go 1.23.0 + +toolchain go1.23.8 require ( github.com/go-test/deep v1.1.0 github.com/google/go-github/v35 v35.3.0 github.com/hashicorp/go-multierror v1.1.1 github.com/joho/godotenv v1.5.1 - github.com/sethvargo/go-githubactions v1.3.0 - golang.org/x/oauth2 v0.23.0 + github.com/sethvargo/go-githubactions v1.3.1 + golang.org/x/oauth2 v0.29.0 gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 gopkg.in/yaml.v2 v2.4.0 ) @@ -16,5 +18,5 @@ require ( require ( github.com/google/go-querystring v1.1.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect - golang.org/x/crypto v0.27.0 // indirect + golang.org/x/crypto v0.37.0 // indirect ) diff --git a/src/go.sum b/src/go.sum index 2b532f8..05c70eb 100644 --- a/src/go.sum +++ b/src/go.sum @@ -17,15 +17,15 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/sethvargo/go-githubactions v1.3.0 h1:Kg633LIUV2IrJsqy2MfveiED/Ouo+H2P0itWS0eLh8A= -github.com/sethvargo/go-githubactions v1.3.0/go.mod h1:7/4WeHgYfSz9U5vwuToCK9KPnELVHAhGtRwLREOQV80= +github.com/sethvargo/go-githubactions v1.3.1 h1:rlwwLRUaunWLQ1aN2o5Y+3s0xhaTC30YObCnilRx448= +github.com/sethvargo/go-githubactions v1.3.1/go.mod h1:7/4WeHgYfSz9U5vwuToCK9KPnELVHAhGtRwLREOQV80= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= -golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98= +golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/src/utils/github_test.go b/src/utils/github_test.go index 5e735a9..d967ad1 100644 --- a/src/utils/github_test.go +++ b/src/utils/github_test.go @@ -94,7 +94,6 @@ type githubRepositoryFileTest struct { var githubRepositoryFileTests = [...]githubRepositoryFileTest{ {"", "owner", "repo", "path", "GET https://api.github.com/repos/owner/repo/contents/path: 404 Not Found []"}, - {"token", "owner", "repo", "path", "GET https://api.github.com/repos/owner/repo/contents/path: 401 Bad credentials []"}, {"", "MP-ES", "k8s-deploy", "README.md", ""}, {"", "MP-ES", "k8s-deploy", "src", "path 'src' is not a file"}, }