mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-06-13 15:47:37 +08:00
Merge branch 'main' into feat/update-deps
This commit is contained in:
commit
e7f56dae83
3 changed files with 39 additions and 41 deletions
21
.github/workflows/build-dev.yml
vendored
21
.github/workflows/build-dev.yml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
- name: 加载版本号
|
||||
run: |
|
||||
if [ -f DEV-VERSION ]; then
|
||||
|
|
@ -46,10 +46,9 @@ jobs:
|
|||
goarch: [amd64, arm64]
|
||||
env:
|
||||
OUTPUT_BINARY: ghproxy
|
||||
GO_VERSION: 1.25
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: dev
|
||||
- name: 加载版本号
|
||||
|
|
@ -65,9 +64,9 @@ jobs:
|
|||
sudo rm -rf pages/.git/
|
||||
|
||||
- name: 安装 Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
go-version-file: go.mod
|
||||
- name: 编译
|
||||
env:
|
||||
GOOS: ${{ matrix.goos }}
|
||||
|
|
@ -83,7 +82,7 @@ jobs:
|
|||
tar -czf ${{ env.OUTPUT_BINARY }}-${{matrix.goos}}-${{matrix.goarch}}.tar.gz -C ghproxyd .
|
||||
ls
|
||||
- name: 上传Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ env.OUTPUT_BINARY }}-${{matrix.goos}}-${{matrix.goarch}}
|
||||
path: |
|
||||
|
|
@ -112,7 +111,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: dev
|
||||
- name: Load VERSION
|
||||
|
|
@ -124,19 +123,19 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: 构建镜像
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
file: ./${{ env.DOCKERFILE }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
|
|
|||
29
.github/workflows/build.yml
vendored
29
.github/workflows/build.yml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: main
|
||||
- name: 加载版本号
|
||||
|
|
@ -40,17 +40,16 @@ jobs:
|
|||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prepare # 确保这个作业在 prepare 作业完成后运行
|
||||
needs: prepare
|
||||
strategy:
|
||||
matrix:
|
||||
goos: [linux, darwin, freebsd]
|
||||
goarch: [amd64, arm64]
|
||||
env:
|
||||
OUTPUT_BINARY: ghproxy
|
||||
GO_VERSION: 1.25
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: main
|
||||
- name: 加载版本号
|
||||
|
|
@ -66,9 +65,9 @@ jobs:
|
|||
sudo rm -rf pages/.git/
|
||||
|
||||
- name: 安装 Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
go-version-file: go.mod
|
||||
- name: 编译
|
||||
env:
|
||||
GOOS: ${{ matrix.goos }}
|
||||
|
|
@ -83,7 +82,7 @@ jobs:
|
|||
cp LICENSE ./ghproxyd/
|
||||
tar -czf ${{ env.OUTPUT_BINARY }}-${{matrix.goos}}-${{matrix.goarch}}.tar.gz -C ghproxyd .
|
||||
- name: 上传Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ env.OUTPUT_BINARY }}-${{matrix.goos}}-${{matrix.goarch}}
|
||||
path: |
|
||||
|
|
@ -103,14 +102,14 @@ jobs:
|
|||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build # 确保这个作业在 build 作业完成后运行
|
||||
needs: build
|
||||
env:
|
||||
IMAGE_NAME: wjqserver/ghproxy # 定义镜像名称变量
|
||||
DOCKERFILE: docker/dockerfile/release/Dockerfile # 定义 Dockerfile 路径变量
|
||||
IMAGE_NAME: wjqserver/ghproxy
|
||||
DOCKERFILE: docker/dockerfile/release/Dockerfile
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: main
|
||||
- name: Load VERSION
|
||||
|
|
@ -122,19 +121,19 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: 构建镜像
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
file: ./${{ env.DOCKERFILE }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -10,7 +10,6 @@ require (
|
|||
)
|
||||
|
||||
require (
|
||||
github.com/WJQSERVER-STUDIO/go-utils/iox v0.0.3
|
||||
github.com/WJQSERVER-STUDIO/go-utils/limitreader v0.0.2
|
||||
github.com/WJQSERVER/wanf v0.0.8
|
||||
github.com/fenthope/bauth v0.0.1
|
||||
|
|
@ -25,6 +24,7 @@ require (
|
|||
)
|
||||
|
||||
require (
|
||||
github.com/WJQSERVER-STUDIO/go-utils/iox v0.0.3 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
golang.org/x/text v0.36.0 // indirect
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue