mirror of
https://github.com/woodchen-ink/proxy-go.git
synced 2025-07-18 08:31:55 +08:00
添加版本镜像和持续稳定版镜像
This commit is contained in:
parent
512ec6707d
commit
26af4b2b07
109
.github/workflows/docker-version-build.yml
vendored
Normal file
109
.github/workflows/docker-version-build.yml
vendored
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
paths-ignore: [ '**.md','docker-compose.yml' ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-web:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '22'
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: web/package-lock.json
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: web
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Build web
|
||||||
|
working-directory: web
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Upload web artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: web-out
|
||||||
|
path: web/out
|
||||||
|
|
||||||
|
build-backend:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [amd64, arm64]
|
||||||
|
include:
|
||||||
|
- arch: amd64
|
||||||
|
goarch: amd64
|
||||||
|
- arch: arm64
|
||||||
|
goarch: arm64
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.23'
|
||||||
|
|
||||||
|
- name: Build binary
|
||||||
|
env:
|
||||||
|
GOOS: linux
|
||||||
|
GOARCH: ${{ matrix.goarch }}
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
run: |
|
||||||
|
go build -o proxy-go-${{ matrix.arch }}
|
||||||
|
|
||||||
|
- name: Upload binary artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: proxy-go-${{ matrix.arch }}
|
||||||
|
path: proxy-go-${{ matrix.arch }}
|
||||||
|
|
||||||
|
docker:
|
||||||
|
needs: [build-web, build-backend]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Download all artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: woodchen
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create Docker build context
|
||||||
|
run: |
|
||||||
|
mkdir -p docker-context
|
||||||
|
cp Dockerfile docker-context/
|
||||||
|
cp proxy-go-amd64/proxy-go-amd64 docker-context/proxy-go.amd64
|
||||||
|
cp proxy-go-arm64/proxy-go-arm64 docker-context/proxy-go.arm64
|
||||||
|
mkdir -p docker-context/web/out
|
||||||
|
cp -r web-out/* docker-context/web/out/
|
||||||
|
|
||||||
|
- name: Build and push Docker images
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: docker-context
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
woodchen/proxy-go:${{ github.ref_name }}
|
||||||
|
woodchen/proxy-go:stable
|
@ -4,6 +4,13 @@ A 'simple' reverse proxy server written in Go.
|
|||||||
|
|
||||||
使用方法: https://www.q58.club/t/topic/165
|
使用方法: https://www.q58.club/t/topic/165
|
||||||
|
|
||||||
|
```
|
||||||
|
最新镜像地址: woodchen/proxy-go:latest
|
||||||
|
|
||||||
|
稳定版镜像地址: woodchen/proxy-go:v1.0.4
|
||||||
|
持续稳定版镜像地址: woodchen/proxy-go:stable
|
||||||
|
```
|
||||||
|
|
||||||
## 新版统计仪表盘
|
## 新版统计仪表盘
|
||||||
|
|
||||||

|

|
||||||
|
Loading…
x
Reference in New Issue
Block a user