maven.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # This workflow will build a Java project with Maven
  2. # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
  3. name: PIG 构建action
  4. on:
  5. push:
  6. branches: [ jdk17-dev,dev ]
  7. pull_request:
  8. branches: [ jdk17-dev,dev ]
  9. jobs:
  10. build:
  11. runs-on: ubuntu-latest
  12. strategy:
  13. matrix:
  14. java-version: [ 17,21 ]
  15. steps:
  16. - uses: actions/checkout@v4
  17. - name: Set up JDK ${{ matrix.java-version }}
  18. uses: actions/setup-java@v4
  19. with:
  20. java-version: ${{ matrix.java-version }}
  21. distribution: 'zulu'
  22. - name: mvn spring-javaformat:validate
  23. run: mvn spring-javaformat:validate
  24. - name: mvn clean install
  25. run: mvn clean install -Pboot
  26. - name: mvn clean install
  27. run: mvn clean install
  28. - name: Start containers
  29. run: docker-compose build && docker-compose up -d
  30. - name: failure
  31. if: failure() && github.repository == 'lttcai-mesh/lttcai'
  32. uses: chf007/action-wechat-work@master
  33. env:
  34. WECHAT_WORK_BOT_WEBHOOK: ${{secrets.WECHAT_WORK_BOT_WEBHOOK}}
  35. with:
  36. msgtype: markdown
  37. content: |
  38. # 💤🤷‍♀️ failure 🙅‍♂️💣 [lttcai-mesh/lttcai](https://github.com/lttcai-mesh/lttcai)
  39. > Github Action: https://github.com/lttcai-mesh/lttcai failure
  40. > (⋟﹏⋞) from github action message