mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-23 13:03:42 +08:00
0af4e21566
The AdoptOpenJDK has been discontinued since July 2021 (https://adoptopenjdk.net). This request is to switch the distribution from 'adopt' to Azul `zulu`. When using Zulu you get all the latest updated (TCK Tested) builds for all versions of OpenJDK even archived fixed versions. Also added to the GH Action workflow are fixed (major) release version(s) such as `JDK 11.0.3`. This is often a good practice whenever a build/test triggers (push/pull events) to help determine if the latest (`JDK 11`) had failed the from the **latest build** vs something in **your code** caused (or introduced). **For example**, when building with `JDK 11.0.3` (fixed version) the build/tests passes (Green) and JDK 11 fails (Red) will mean that the latest `JDK 11` was the cause and not your code. **Note:** Other distributions such as Temurin do not support archived fixed releases prior to Sept. 2021 and many of the non-LTS (long term support) releases if you are planning to try out newer features of the Java language.
67 lines
2.2 KiB
YAML
67 lines
2.2 KiB
YAML
# 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:
|
|
branches: [ master,dev ]
|
|
pull_request:
|
|
branches: [ master,dev ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
java-version: [ 11.0.3, 11 ]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up JDK ${{ matrix.java-version }}
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
java-version: ${{ matrix.java-version }}
|
|
distribution: 'zulu'
|
|
|
|
- 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: success
|
|
if: success() && 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: |
|
|
# 💯👨💻 Success 🎉🎉🎉 [pig-mesh/pig](https://github.com/pig-mesh/pig)
|
|
> Github Action: https://github.com/pig-mesh/pig success
|
|
> ^_^ from github action message
|
|
|
|
- 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
|
|
- uses: shaowenchen/debugger-action@v2
|
|
if: github.repository == 'pig-mesh/pig'
|
|
name: debugger
|
|
continue-on-error: true
|
|
with:
|
|
frp_server_addr: ${{ secrets.FRP_SERVER_ADDR }}
|
|
frp_server_port: ${{ secrets.FRP_SERVER_PORT }}
|
|
frp_token: ${{ secrets.FRP_TOKEN }}
|
|
ssh_port: ${{ secrets.SSH_PORT }}
|