From dc34a68542b8566ce22de983dd890428922838fc Mon Sep 17 00:00:00 2001
From: fatedier
Date: Mon, 19 Feb 2024 16:45:25 +0800
Subject: [PATCH] support go1.22 and drop support for go1.20 (#4001)
---
.circleci/config.yml | 4 ++--
.github/workflows/build-and-push-image.yml | 12 ++++++------
.github/workflows/golangci-lint.yml | 8 ++++----
.github/workflows/goreleaser.yml | 8 ++++----
README.md | 4 ----
README_zh.md | 4 ----
dockerfiles/Dockerfile-for-frpc | 2 +-
dockerfiles/Dockerfile-for-frps | 2 +-
go.mod | 2 +-
9 files changed, 19 insertions(+), 27 deletions(-)
diff --git a/.circleci/config.yml b/.circleci/config.yml
index c7e1ef67..794ce64a 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -2,7 +2,7 @@ version: 2
jobs:
go-version-latest:
docker:
- - image: cimg/go:1.21-node
+ - image: cimg/go:1.22-node
resource_class: large
steps:
- checkout
@@ -10,7 +10,7 @@ jobs:
- run: make alltest
go-version-last:
docker:
- - image: cimg/go:1.20-node
+ - image: cimg/go:1.21-node
resource_class: large
steps:
- checkout
diff --git a/.github/workflows/build-and-push-image.yml b/.github/workflows/build-and-push-image.yml
index 9607ba18..d1516f80 100644
--- a/.github/workflows/build-and-push-image.yml
+++ b/.github/workflows/build-and-push-image.yml
@@ -19,15 +19,15 @@ jobs:
steps:
# environment
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set up QEMU
- uses: docker/setup-qemu-action@v2
+ uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
+ uses: docker/setup-buildx-action@v3
# get image tag name
- name: Get Image Tag Name
@@ -38,13 +38,13 @@ jobs:
echo "TAG_NAME=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
fi
- name: Login to DockerHub
- uses: docker/login-action@v2
+ uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to the GPR
- uses: docker/login-action@v2
+ uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@@ -72,7 +72,7 @@ jobs:
${{ env.TAG_FRPC_GPR }}
- name: Build and push frps
- uses: docker/build-push-action@v4
+ uses: docker/build-push-action@v5
with:
context: .
file: ./dockerfiles/Dockerfile-for-frps
diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml
index 9517af53..6b8075f7 100644
--- a/.github/workflows/golangci-lint.yml
+++ b/.github/workflows/golangci-lint.yml
@@ -14,12 +14,12 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- - uses: actions/setup-go@v4
+ - uses: actions/setup-go@v5
with:
- go-version: '1.21'
- - uses: actions/checkout@v3
+ go-version: '1.22'
+ - uses: actions/checkout@v4
- name: golangci-lint
- uses: golangci/golangci-lint-action@v3
+ uses: golangci/golangci-lint-action@v4
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.55
diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml
index a0aae79d..7c01f376 100644
--- a/.github/workflows/goreleaser.yml
+++ b/.github/workflows/goreleaser.yml
@@ -8,21 +8,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
- uses: actions/setup-go@v4
+ uses: actions/setup-go@v5
with:
- go-version: '1.21'
+ go-version: '1.22'
- name: Make All
run: |
./package.sh
- name: Run GoReleaser
- uses: goreleaser/goreleaser-action@v4
+ uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean --release-notes=./Release.md
diff --git a/README.md b/README.md
index a665610e..cf6b7cf5 100644
--- a/README.md
+++ b/README.md
@@ -11,10 +11,6 @@
-  
-
-
-
diff --git a/README_zh.md b/README_zh.md
index c54bdce7..d78875c4 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -13,10 +13,6 @@ frp 是一个专注于内网穿透的高性能的反向代理应用,支持 TCP
-  
-
-
-
diff --git a/dockerfiles/Dockerfile-for-frpc b/dockerfiles/Dockerfile-for-frpc
index 19d07db8..99b31207 100644
--- a/dockerfiles/Dockerfile-for-frpc
+++ b/dockerfiles/Dockerfile-for-frpc
@@ -1,4 +1,4 @@
-FROM golang:1.21 AS building
+FROM golang:1.22 AS building
COPY . /building
WORKDIR /building
diff --git a/dockerfiles/Dockerfile-for-frps b/dockerfiles/Dockerfile-for-frps
index 93f169fc..3d2c387a 100644
--- a/dockerfiles/Dockerfile-for-frps
+++ b/dockerfiles/Dockerfile-for-frps
@@ -1,4 +1,4 @@
-FROM golang:1.21 AS building
+FROM golang:1.22 AS building
COPY . /building
WORKDIR /building
diff --git a/go.mod b/go.mod
index 035cec4d..414baedc 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/fatedier/frp
-go 1.20
+go 1.21
require (
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5