diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index d932ec0..73f156b 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -19,7 +19,7 @@ on: # - cron: '30 5 * * 2,4' jobs: - build: + 构建应用: runs-on: ubuntu-latest steps: # https://github.com/actions/checkout @@ -56,6 +56,8 @@ jobs: fi - name: 获取合并请求的消息 if: github.event_name == 'pull_request' + env: + PR_STATUS_FLAG: ${{ github.event.pull_request.merged }} run: | echo "是否是合并关闭的 $PR_STATUS_FLAG" if [[ "$PR_STATUS_FLAG" = true ]] ; then @@ -75,6 +77,23 @@ jobs: echo "不包含" exit 1 fi - - env: - PR_STATUS_FLAG: ${{ github.event.pull_request.merged }} + # https://github.com/actions/setup-node 和 https://cicube.io/workflow-hub/github-action-setup-node/ + - name: 安装nodejs + uses: actions/setup-node@v4 + with: + node-version: '22' + check-latest: true + # cache: 'npm' + # cache-dependency-path: '**/package-lock.json' + - name: 安装node依赖 + run: npm --version + - name: 运行node测试 + run: echo "npm test 成功actions/github-script@v5创建合并请求" + - name: 安装JDK + uses: actions/setup-java@v4 + with: + distribution: 'temurin' # See 'Supported distributions' for available options + java-version: '21' + check-latest: true + cache: 'maven' + # cache-dependency-path: 'sub-project/pom.xml' # optional \ No newline at end of file