From 0721a06c49ec88f9dcdbec74c9974e40771aff55 Mon Sep 17 00:00:00 2001 From: oiov Date: Sun, 22 Jun 2025 14:05:57 +0800 Subject: [PATCH] docs: add repo badges --- .../workflows/docker-build-push-dockerhub.yml | 62 +++++++++++++++++++ .github/workflows/docker-build-push.yml | 1 - README-zh.md | 14 +++-- README.md | 9 ++- 4 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/docker-build-push-dockerhub.yml diff --git a/.github/workflows/docker-build-push-dockerhub.yml b/.github/workflows/docker-build-push-dockerhub.yml new file mode 100644 index 0000000..d55f882 --- /dev/null +++ b/.github/workflows/docker-build-push-dockerhub.yml @@ -0,0 +1,62 @@ +name: Build and Push Docker Image to Docker Hub + +on: + push: + branches: + - main + tags: + - "v*.*.*" + pull_request: + branches: + - main + +env: + REGISTRY: docker.io + IMAGE_NAME: oiovwr/wrdo + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + # 检出代码 + - name: Checkout repository + uses: actions/checkout@v4 + + # 设置 Docker Buildx(支持多平台构建) + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # 登录到 Docker Hub + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # 提取 Docker 镜像元数据(标签、版本等) + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + tags: | + type=sha,format=short + type=ref,event=branch,prefix= + type=ref,event=tag + type=raw,value=latest,enable={{is_default_branch}} + + # 构建并推送 Docker 镜像 + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 # 支持多平台构建 + build-args: | + ENVIRONMENT=${{ github.event.inputs.environment || 'production' }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 76fcd45..5a61bc1 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - pwd tags: - "v*.*.*" pull_request: diff --git a/README-zh.md b/README-zh.md index fb88cb1..2c85bbb 100644 --- a/README-zh.md +++ b/README-zh.md @@ -1,8 +1,14 @@

WR.DO

-

开发文档 · Discord · English | 简体中文

-

生成短链接, 创建 DNS 记录, 管理临时邮箱

- +

+ 开发文档 · Feedback · English | 简体中文 +

+ GitHub Release + star + GitHub forks + GitHub Issues or Pull Requests
+ GitHub Actions Workflow Status + MIT
## 简介 @@ -10,7 +16,7 @@ WR.DO 是一个一站式网络工具平台,集成短链服务、临时邮箱、子域名管理和开放API接口。支持自定义链接、密码保护、访问统计;提供无限制临时邮箱收发;管理多域名DNS记录;内置网站截图、元数据提取等实用API。完整的管理后台,支持用户权限控制和服务配置。 - 官网: [https://wr.do](https://wr.do) -- Demo: [https://699399.xyz](https://699399.xyz) (Account: `admin@admin.com`, Password: `123456`) +- Demo: [https://699399.xyz](https://699399.xyz) (账号: `admin@admin.com`, 密码: `123456`) ## 功能列表 diff --git a/README.md b/README.md index 1da63ff..e47f31a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,12 @@

WR.DO

-

Docs · Discord · English | 简体中文

-

Make Short Links, Manage DNS Records, Receive Emails.

+

Docs · Feedback · English | 简体中文

+ GitHub Release + star + GitHub forks + GitHub Issues or Pull Requests
+ GitHub Actions Workflow Status + MIT
## Introduction