mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-23 05:00:23 +08:00
66 lines
2.1 KiB
YAML
66 lines
2.1 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: [ 8, 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: sync-gitee-mirror
|
|
if: github.repository == 'pig-mesh/pig'
|
|
uses: abersheeran/sync-gitee-mirror@v1-beta
|
|
with:
|
|
repository: log4j/pig
|
|
username: ${{ secrets.GITEE_USERNAME }}
|
|
password: ${{ secrets.GITEE_PASSWORD }}
|
|
|
|
- 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
|