From 27755a6d7bd8607dce1a1677af03f45812767e47 Mon Sep 17 00:00:00 2001 From: Grand-cocoa <1075576561@qq.com49111108+grand-cocoa@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:49:53 +0800 Subject: [PATCH] =?UTF-8?q?```=E8=AE=BE=E7=BD=AEMirai-bot=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=9E=84=E5=BB=BA=E6=B5=8B=E8=AF=95=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新了Gitea Actions的配置,使其能够适配Mirai-bot项目的构建和测试。工作流被重命名为“Mirai-build”,并且新的环境变量指定了裸仓库和克隆仓库的目录。此外,流程中包含了一个新的步骤,用于克隆仓库,并且运行的命令现在会导航到克隆的目录并使`mvnw`可执行。 ``` --- .gitea/workflows/build-test.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build-test.yaml b/.gitea/workflows/build-test.yaml index 0b60a1c..a2bc646 100644 --- a/.gitea/workflows/build-test.yaml +++ b/.gitea/workflows/build-test.yaml @@ -1,15 +1,17 @@ -name: Gitea Actions Demo +name: Mirai-build run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 on: [ push ] - +env: + BARE_REPO_DIR: /var/lib/gitea/data/gitea-repositories/Dace/Mirai-bot.git + CLONED_REPO_DIR: ./Dace/Mirai-bot jobs: Explore-Gitea-Actions: runs-on: ubuntu-latest steps: - - run: pwd - - run: ls - - run: cd ${{ gitea.workspace }} - - run: pwd - - run: ls + - run: | + rm -rf $CLONED_REPO_DIR + git clone $BARE_REPO_DIR $CLONED_REPO_DIR + - run: cd $CLONED_REPO_DIR + - run: chmod +x ./mvnw - run: sh ./mvnw -DskipTests=true clean package -P prod - run: docker build -t mirai-bot:latest