Some checks failed
/ build-and-push (ruoyi-auth) (push) Failing after 9s
/ build-and-push (ruoyi-gateway) (push) Failing after 5s
/ build-and-push (ruoyi-modules/Property) (push) Failing after 5s
/ build-and-push (ruoyi-modules/Sis) (push) Failing after 5s
/ build-and-push (ruoyi-modules/ruoyi-gen) (push) Failing after 5s
/ build-and-push (ruoyi-modules/ruoyi-job) (push) Failing after 5s
/ build-and-push (ruoyi-modules/ruoyi-resource) (push) Failing after 5s
/ build-and-push (ruoyi-modules/ruoyi-system) (push) Failing after 5s
/ build-and-push (ruoyi-modules/ruoyi-workflow) (push) Failing after 5s
/ build-and-push (ruoyi-seata-server) (push) Failing after 5s
/ build-and-push (ruoyi-sentinel-dashboard) (push) Failing after 5s
/ build-and-push (ruoyi-snailjob-server) (push) Failing after 5s
/ build-and-push (ruoyi-visual/ruoyi-monitor) (push) Failing after 5s
/ build-and-push (ruoyi-visual/ruoyi-nacos) (push) Failing after 4s
65 lines
2.1 KiB
YAML
65 lines
2.1 KiB
YAML
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
on:
|
|
push:
|
|
branches:
|
|
- master # 监听master分支
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu
|
|
strategy:
|
|
matrix:
|
|
service:
|
|
- ruoyi-auth
|
|
- ruoyi-gateway
|
|
- ruoyi-modules/Property
|
|
- ruoyi-modules/ruoyi-gen
|
|
- ruoyi-modules/ruoyi-job
|
|
- ruoyi-modules/ruoyi-resource
|
|
- ruoyi-modules/ruoyi-system
|
|
- ruoyi-modules/ruoyi-workflow
|
|
- ruoyi-modules/Sis
|
|
- ruoyi-visual/ruoyi-monitor
|
|
- ruoyi-visual/ruoyi-nacos
|
|
- ruoyi-seata-server
|
|
- ruoyi-sentinel-dashboard
|
|
- ruoyi-snailjob-server
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: http://git.missmoc.top/mocheng/checkout@v4
|
|
|
|
- name: Set Up JDK
|
|
uses: http://git.missmoc.top/mocheng/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
|
|
- name: Build Project with Maven
|
|
run: mvn clean package -DskipTests -f ./${{ matrix.service }}/pom.xml
|
|
|
|
- name: Set Up Docker Buildx
|
|
uses: http://git.missmoc.top/mocheng/setup-buildx-action@v3
|
|
|
|
- name: Login to Gitea Container Registry
|
|
uses: http://git.missmoc.top/mocheng/login-action@v3
|
|
with:
|
|
registry: ${{ secrets.REGISTRY_URL }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASS }}
|
|
|
|
- name: Determine Dockerfile Path
|
|
id: dockerfile-path
|
|
run: |
|
|
if [ "${{ matrix.service }}" = "ruoyi-visual/ruoyi-nacos" ]; then
|
|
echo "dockerfile_path=./ruoyi-visual/ruoyi-nacos/Dockerfile" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "dockerfile_path=./${{ matrix.service }}/Dockerfile" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Build and Push Docker Image
|
|
uses: http://git.missmoc.top/mocheng/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ${{ steps.dockerfile-path.outputs.dockerfile_path }}
|
|
tags: ${{ secrets.REGISTRY_URL }}/by2025/${{ matrix.service }}:${{ github.sha }}
|
|
push: true
|