cicd
Some checks failed
/ build-and-push (ruoyi-auth) (push) Has been cancelled
/ build-and-push (ruoyi-gateway) (push) Has been cancelled
/ build-and-push (ruoyi-modules/Property) (push) Has been cancelled
/ build-and-push (ruoyi-modules/Sis) (push) Has been cancelled
/ build-and-push (ruoyi-modules/ruoyi-gen) (push) Has been cancelled
/ build-and-push (ruoyi-modules/ruoyi-job) (push) Has been cancelled
/ build-and-push (ruoyi-modules/ruoyi-resource) (push) Has been cancelled
/ build-and-push (ruoyi-modules/ruoyi-system) (push) Has been cancelled
/ build-and-push (ruoyi-modules/ruoyi-workflow) (push) Has been cancelled
/ build-and-push (ruoyi-seata-server) (push) Has been cancelled
/ build-and-push (ruoyi-sentinel-dashboard) (push) Has been cancelled
/ build-and-push (ruoyi-snailjob-server) (push) Has been cancelled
/ build-and-push (ruoyi-visual/ruoyi-monitor) (push) Has been cancelled
/ build-and-push (ruoyi-visual/ruoyi-nacos) (push) Has been cancelled
Some checks failed
/ build-and-push (ruoyi-auth) (push) Has been cancelled
/ build-and-push (ruoyi-gateway) (push) Has been cancelled
/ build-and-push (ruoyi-modules/Property) (push) Has been cancelled
/ build-and-push (ruoyi-modules/Sis) (push) Has been cancelled
/ build-and-push (ruoyi-modules/ruoyi-gen) (push) Has been cancelled
/ build-and-push (ruoyi-modules/ruoyi-job) (push) Has been cancelled
/ build-and-push (ruoyi-modules/ruoyi-resource) (push) Has been cancelled
/ build-and-push (ruoyi-modules/ruoyi-system) (push) Has been cancelled
/ build-and-push (ruoyi-modules/ruoyi-workflow) (push) Has been cancelled
/ build-and-push (ruoyi-seata-server) (push) Has been cancelled
/ build-and-push (ruoyi-sentinel-dashboard) (push) Has been cancelled
/ build-and-push (ruoyi-snailjob-server) (push) Has been cancelled
/ build-and-push (ruoyi-visual/ruoyi-monitor) (push) Has been cancelled
/ build-and-push (ruoyi-visual/ruoyi-nacos) (push) Has been cancelled
This commit is contained in:
@@ -27,22 +27,36 @@ jobs:
|
|||||||
- ruoyi-snailjob-server
|
- ruoyi-snailjob-server
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
# 使用本地Gitea仓库的checkout action
|
||||||
|
uses: http://47.109.37.87:3000/bichangxiong/checkout@v3
|
||||||
|
# 如果是私有仓库,可能需要令牌
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
- name: Set Up JDK
|
- name: Set Up JDK
|
||||||
uses: actions/setup-java@v3
|
# 使用本地Gitea仓库的setup-java action
|
||||||
|
uses: http://47.109.37.87:3000/bichangxiong/java-setup@v3
|
||||||
with:
|
with:
|
||||||
java-version: '17' # 按项目实际Java版本调整
|
java-version: '17' # 按项目实际Java版本调整
|
||||||
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
|
||||||
uses: docker/setup-buildx-action@v2
|
# 使用本地Gitea仓库的setup-buildx-action
|
||||||
|
uses: http://47.109.37.87:3000/cicd/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Login to Gitea Container Registry
|
- name: Login to Gitea Container Registry
|
||||||
uses: docker/login-action@v2
|
# 使用本地Gitea仓库的login-action
|
||||||
|
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 }}
|
||||||
@@ -58,9 +72,11 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build and Push Docker Image
|
- name: Build and Push Docker Image
|
||||||
uses: docker/build-push-action@v4
|
# 使用本地Gitea仓库的build-push-action
|
||||||
|
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