2021-04-16 11:47:36 +08:00
|
|
|
# This workflow will build a Java project with Maven
|
|
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
|
|
|
|
|
|
|
name: PIG 构建action
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-04-16 11:47:59 +08:00
|
|
|
branches: [ master,dev ]
|
2021-04-16 11:47:36 +08:00
|
|
|
pull_request:
|
2021-04-16 11:47:59 +08:00
|
|
|
branches: [ master,dev ]
|
2021-04-16 11:47:36 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2021-10-05 00:09:22 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-10-22 16:42:39 +08:00
|
|
|
java-version: [ 8,11,17,21 ]
|
2021-04-16 11:47:36 +08:00
|
|
|
steps:
|
2024-03-03 14:12:15 +08:00
|
|
|
- uses: actions/checkout@v4
|
2021-10-05 00:09:22 +08:00
|
|
|
- name: Set up JDK ${{ matrix.java-version }}
|
2021-09-12 07:53:23 +08:00
|
|
|
uses: actions/setup-java@v2
|
|
|
|
with:
|
2021-10-05 00:09:22 +08:00
|
|
|
java-version: ${{ matrix.java-version }}
|
|
|
|
distribution: 'zulu'
|
2021-09-12 07:53:23 +08:00
|
|
|
|
|
|
|
- name: mvn spring-javaformat:validate
|
|
|
|
run: mvn spring-javaformat:validate
|
|
|
|
|
|
|
|
- name: mvn clean install
|
|
|
|
run: mvn clean install
|
|
|
|
|
|
|
|
- name: Start containers
|
|
|
|
run: docker-compose build && docker-compose up -d
|
|
|
|
|
|
|
|
- name: failure
|
|
|
|
if: failure() && github.repository == 'pig-mesh/pig'
|
|
|
|
uses: chf007/action-wechat-work@master
|
|
|
|
env:
|
|
|
|
WECHAT_WORK_BOT_WEBHOOK: ${{secrets.WECHAT_WORK_BOT_WEBHOOK}}
|
|
|
|
with:
|
|
|
|
msgtype: markdown
|
|
|
|
content: |
|
|
|
|
# 💤🤷♀️ failure 🙅♂️💣 [pig-mesh/pig](https://github.com/pig-mesh/pig)
|
|
|
|
> Github Action: https://github.com/pig-mesh/pig failure
|
|
|
|
> (⋟﹏⋞) from github action message
|