更新 .gitea/workflows/demo.yaml
自动流水线示例 / build (push) Successful in 25s
Details
自动流水线示例 / build (push) Successful in 25s
Details
发布生产
This commit is contained in:
parent
99477c817b
commit
b028a6d4cb
|
|
@ -78,42 +78,3 @@ jobs:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PR_STATUS_FLAG: ${{ github.event.pull_request.merged }}
|
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
|
|
||||||
- name: 安装Maven
|
|
||||||
uses: stCarolas/setup-maven@v5
|
|
||||||
with:
|
|
||||||
maven-version: 3.9.11
|
|
||||||
- name: Maven打包
|
|
||||||
run: |
|
|
||||||
echo "mvn clean install -DskipTests && mvn -B package --file pom.xml"
|
|
||||||
mvn --version
|
|
||||||
- name: 构建镜像并推送
|
|
||||||
run: |
|
|
||||||
echo 'docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}"'
|
|
||||||
echo 'docker build -t <dockerhub repository name>.'
|
|
||||||
echo 'docker push <dockerhub repository name>:latest'
|
|
||||||
docker info
|
|
||||||
|
|
||||||
- name: 列出工作目录列表
|
|
||||||
run: |
|
|
||||||
ls ${{ gitea.workspace }}
|
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
|
||||||
Loading…
Reference in New Issue