更新 .gitea/workflows/demo.yaml
自动流水线示例 / 构建应用 (push) Successful in 1m23s
Details
自动流水线示例 / 构建应用 (push) Successful in 1m23s
Details
发布生产
This commit is contained in:
parent
b028a6d4cb
commit
ef143d4737
|
|
@ -19,7 +19,7 @@ on:
|
||||||
# - cron: '30 5 * * 2,4'
|
# - cron: '30 5 * * 2,4'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
构建应用:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# https://github.com/actions/checkout
|
# https://github.com/actions/checkout
|
||||||
|
|
@ -56,6 +56,8 @@ jobs:
|
||||||
fi
|
fi
|
||||||
- name: 获取合并请求的消息
|
- name: 获取合并请求的消息
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
env:
|
||||||
|
PR_STATUS_FLAG: ${{ github.event.pull_request.merged }}
|
||||||
run: |
|
run: |
|
||||||
echo "是否是合并关闭的 $PR_STATUS_FLAG"
|
echo "是否是合并关闭的 $PR_STATUS_FLAG"
|
||||||
if [[ "$PR_STATUS_FLAG" = true ]] ; then
|
if [[ "$PR_STATUS_FLAG" = true ]] ; then
|
||||||
|
|
@ -75,6 +77,23 @@ jobs:
|
||||||
echo "不包含"
|
echo "不包含"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
# https://github.com/actions/setup-node 和 https://cicube.io/workflow-hub/github-action-setup-node/
|
||||||
env:
|
- name: 安装nodejs
|
||||||
PR_STATUS_FLAG: ${{ github.event.pull_request.merged }}
|
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
|
||||||
Loading…
Reference in New Issue