From e477fe791c07a582943c025b382643785eee72f1 Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Wed, 11 Oct 2023 13:57:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore:=20Add=20docker=20badge=20?= =?UTF-8?q?and=20update=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 1 + .github/workflows/auto-merge.yml | 25 ------------------- .github/workflows/docker.yml | 14 +++++------ ...use-badger-advanced.yml => lighthouse.yml} | 4 +-- .../{pre-welcome.yml => pr-welcome.yml} | 9 ++++--- .github/workflows/release.yml | 2 +- .github/workflows/sync.yml | 8 +----- .github/workflows/test.yml | 2 +- .github/workflows/wiki-sync.yml | 2 +- README.md | 3 +++ README.zh-CN.md | 3 +++ 11 files changed, 24 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/auto-merge.yml rename .github/workflows/{lighthouse-badger-advanced.yml => lighthouse.yml} (93%) rename .github/workflows/{pre-welcome.yml => pr-welcome.yml} (65%) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7707b1aa93..ae2208c76a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,6 +4,7 @@ - [ ] ✨ feat - [ ] 🐛 fix +- [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml deleted file mode 100644 index 90ae2d9dee..0000000000 --- a/.github/workflows/auto-merge.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Dependabot Auto Merge -on: - pull_request_target: - types: [labeled, edited] - -jobs: - merge: - if: contains(github.event.pull_request.labels.*.name, 'dependencies') - name: Dependabot Auto Merge - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install bun - uses: oven-sh/setup-bun@v1 - - - name: Install deps - run: bun i - - - name: Merge - uses: ahmadnassri/action-dependabot-auto-merge@v2 - with: - command: merge - target: minor - github-token: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9751f0de36..cbfce1c8bb 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,4 +1,4 @@ -name: Publish Docker image +name: Publish Docker Image on: workflow_dispatch: @@ -11,16 +11,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_REGISTRY_USER }} password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: lobehub/lobe-chat tags: | @@ -28,13 +28,13 @@ jobs: type=ref,event=tag - 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 - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/lighthouse-badger-advanced.yml b/.github/workflows/lighthouse.yml similarity index 93% rename from .github/workflows/lighthouse-badger-advanced.yml rename to .github/workflows/lighthouse.yml index c174e9b19a..39cb86013b 100644 --- a/.github/workflows/lighthouse-badger-advanced.yml +++ b/.github/workflows/lighthouse.yml @@ -40,9 +40,7 @@ jobs: URLS: 'https://chat-preview.lobehub.com/settings' BADGES_ARGS: '-b pagespeed -o lighthouse/settings -r' COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Settings' - #################################################################### - # THAT'S IT; YOU DON'T HAVE TO DEFINE ANYTHING IN THE FOLLOWING - #################################################################### + steps: - name: Preparatory Tasks run: | diff --git a/.github/workflows/pre-welcome.yml b/.github/workflows/pr-welcome.yml similarity index 65% rename from .github/workflows/pre-welcome.yml rename to .github/workflows/pr-welcome.yml index 2b9700f558..6ff6daa407 100644 --- a/.github/workflows/pre-welcome.yml +++ b/.github/workflows/pr-welcome.yml @@ -7,17 +7,18 @@ on: jobs: if_merged: + name: Check merged and add comment if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - uses: actions-cool/pr-welcome@main with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GH_TOKEN }} comment: | - 🎉 Great PR @${{ github.event.pull_request.user.login }} 🎉 + ❤️ Great PR @${{ github.event.pull_request.user.login }} ❤️ - The growth of project is inseparable from user feedback and contribution, thanks for your contribution ❤️ + The growth of project is inseparable from user feedback and contribution, thanks for your contribution! - 项目的成长离不开用户反馈和贡献,感谢您的贡献 ❤️ + 项目的成长离不开用户反馈和贡献,感谢您的贡献! emoji: 'hooray' pr-emoji: '+1, heart' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3fb3b941c5..053992a798 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - name: Test run: bun run test - - name: release + - name: Release run: bun run release env: GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index c059a3ef92..7ef23164d3 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -17,11 +17,8 @@ jobs: if: ${{ github.event.repository.fork }} steps: - # Step 1: run a standard checkout action - - name: Checkout target repo - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - # Step 2: run the sync action - name: Sync upstream changes id: sync uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 @@ -30,11 +27,8 @@ jobs: upstream_sync_branch: main target_sync_branch: main target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set - - # Set test_mode true to run tests instead of the true action!! test_mode: false - # Step 3: run check - name: Sync check if: failure() uses: actions-cool/issues-helper@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f7b8c846fc..1446dbe4b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: - name: Install deps run: bun i - - name: lint + - name: Lint run: bun run lint - name: Test and coverage diff --git a/.github/workflows/wiki-sync.yml b/.github/workflows/wiki-sync.yml index ed26b4c343..1d1eedd881 100644 --- a/.github/workflows/wiki-sync.yml +++ b/.github/workflows/wiki-sync.yml @@ -11,7 +11,7 @@ on: jobs: update-wiki: runs-on: ubuntu-latest - name: wiki sync + name: Wiki sync steps: - uses: OrlovM/Wiki-Action@v1 with: diff --git a/README.md b/README.md index dee178945d..cdfa6b29ec 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ LobeChat is a open-source, extensible ([Function Calling][fc-link]), high-perfor [![][github-release-shield]][github-release-link] +[![][docker-release-shield]][docker-release-link] [![][vercel-shield]][vercel-link] [![][discord-shield]][discord-link] [![][github-releasedate-shield]][github-releasedate-link] @@ -333,6 +334,8 @@ This project is [MIT](./LICENSE) licensed. [discord-link]: https://discord.gg/AYFPHvv2jT [discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square [discord-shield-badge]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat +[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square [fc-link]: https://sspai.com/post/81986 [fossa-license-link]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat [fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large diff --git a/README.zh-CN.md b/README.zh-CN.md index 9b16c8037d..67708839b6 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -15,6 +15,7 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-link])高 [![][github-release-shield]][github-release-link] +[![][docker-release-shield]][docker-release-link] [![][vercel-shield]][vercel-link] [![][discord-shield]][discord-link] [![][github-releasedate-shield]][github-releasedate-link] @@ -335,6 +336,8 @@ This project is [MIT](./LICENSE) licensed. [discord-link]: https://discord.gg/AYFPHvv2jT [discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square [discord-shield-badge]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat +[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square [fc-link]: https://sspai.com/post/81986 [fossa-license-link]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat [fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large