cicd
Some checks are pending
/ build-and-push (ruoyi-auth) (push) Waiting to run
/ build-and-push (ruoyi-gateway) (push) Waiting to run
/ build-and-push (ruoyi-modules/Property) (push) Waiting to run
/ build-and-push (ruoyi-modules/Sis) (push) Waiting to run
/ build-and-push (ruoyi-modules/ruoyi-gen) (push) Waiting to run
/ build-and-push (ruoyi-modules/ruoyi-job) (push) Waiting to run
/ build-and-push (ruoyi-modules/ruoyi-resource) (push) Waiting to run
/ build-and-push (ruoyi-modules/ruoyi-system) (push) Waiting to run
/ build-and-push (ruoyi-modules/ruoyi-workflow) (push) Waiting to run
/ build-and-push (ruoyi-seata-server) (push) Waiting to run
/ build-and-push (ruoyi-sentinel-dashboard) (push) Waiting to run
/ build-and-push (ruoyi-snailjob-server) (push) Waiting to run
/ build-and-push (ruoyi-visual/ruoyi-monitor) (push) Waiting to run
/ build-and-push (ruoyi-visual/ruoyi-nacos) (push) Waiting to run
Some checks are pending
/ build-and-push (ruoyi-auth) (push) Waiting to run
/ build-and-push (ruoyi-gateway) (push) Waiting to run
/ build-and-push (ruoyi-modules/Property) (push) Waiting to run
/ build-and-push (ruoyi-modules/Sis) (push) Waiting to run
/ build-and-push (ruoyi-modules/ruoyi-gen) (push) Waiting to run
/ build-and-push (ruoyi-modules/ruoyi-job) (push) Waiting to run
/ build-and-push (ruoyi-modules/ruoyi-resource) (push) Waiting to run
/ build-and-push (ruoyi-modules/ruoyi-system) (push) Waiting to run
/ build-and-push (ruoyi-modules/ruoyi-workflow) (push) Waiting to run
/ build-and-push (ruoyi-seata-server) (push) Waiting to run
/ build-and-push (ruoyi-sentinel-dashboard) (push) Waiting to run
/ build-and-push (ruoyi-snailjob-server) (push) Waiting to run
/ build-and-push (ruoyi-visual/ruoyi-monitor) (push) Waiting to run
/ build-and-push (ruoyi-visual/ruoyi-nacos) (push) Waiting to run
This commit is contained in:
@@ -3,7 +3,7 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master # 替换为要监听的分支
|
- master # 监听master分支
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
@@ -27,36 +27,22 @@ jobs:
|
|||||||
- ruoyi-snailjob-server
|
- ruoyi-snailjob-server
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
# 使用本地Gitea仓库的checkout action
|
uses: actions/checkout@v4
|
||||||
uses: http://47.109.37.87:3000/bichangxiong/checkout@v3
|
|
||||||
# 如果是私有仓库,可能需要令牌
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set Up JDK
|
- name: Set Up JDK
|
||||||
# 使用本地Gitea仓库的setup-java action
|
uses: actions/setup-java@v4
|
||||||
uses: http://47.109.37.87:3000/bichangxiong/java-setup@v3
|
|
||||||
with:
|
with:
|
||||||
java-version: '17' # 按项目实际Java版本调整
|
java-version: '17'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
# 如果需要从本地Maven仓库拉取依赖,可以添加以下配置
|
|
||||||
server-id: gitea
|
|
||||||
server-username: ${{ secrets.REGISTRY_USER }}
|
|
||||||
server-password: ${{ secrets.REGISTRY_PASS }}
|
|
||||||
|
|
||||||
- name: Build Project with Maven
|
- name: Build Project with Maven
|
||||||
run: mvn clean package -DskipTests -f ./${{ matrix.service }}/pom.xml
|
run: mvn clean package -DskipTests -f ./${{ matrix.service }}/pom.xml
|
||||||
env:
|
|
||||||
# 配置Maven使用本地仓库
|
|
||||||
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
|
|
||||||
|
|
||||||
- name: Set Up Docker Buildx
|
- name: Set Up Docker Buildx
|
||||||
# 使用本地Gitea仓库的setup-buildx-action
|
uses: docker/setup-buildx-action@v3
|
||||||
uses: http://47.109.37.87:3000/cicd/setup-buildx-action@v2
|
|
||||||
|
|
||||||
- name: Login to Gitea Container Registry
|
- name: Login to Gitea Container Registry
|
||||||
# 使用本地Gitea仓库的login-action
|
uses: docker/login-action@v3
|
||||||
uses: http://47.109.37.87:3000/cicd/login-action@v2
|
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.REGISTRY_URL }}
|
registry: ${{ secrets.REGISTRY_URL }}
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
@@ -72,11 +58,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build and Push Docker Image
|
- name: Build and Push Docker Image
|
||||||
# 使用本地Gitea仓库的build-push-action
|
uses: docker/build-push-action@v5
|
||||||
uses: http://47.109.37.87:3000/cicd/build-push-action@v4
|
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ${{ steps.dockerfile-path.outputs.dockerfile_path }}
|
file: ${{ steps.dockerfile-path.outputs.dockerfile_path }}
|
||||||
tags: ${{ secrets.REGISTRY_URL }}/by2025/${{ matrix.service }}:${{ github.sha }}
|
tags: ${{ secrets.REGISTRY_URL }}/by2025/${{ matrix.service }}:${{ github.sha }}
|
||||||
push: true
|
push: true
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user