This is an automated email from the ASF dual-hosted git repository. shenlin pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/rocketmq-eventbridge.git
commit fab20bcc98bbaf3546804d7e086c5d618d58eaa3 Author: wangkai <wang...@zhongan.com> AuthorDate: Tue Sep 19 10:10:54 2023 +0800 1.modify workflows file --- .github/workflows/maven-publish.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index b20c7cb..780fdfa 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -18,7 +18,29 @@ jobs: run: | docker pull apache/rocketmq:4.9.4 docker run -d --name rmqnamesrv -p 9876:9876 apache/rocketmq:4.9.4 sh mqnamesrv autoCreateTopicEnable=true + docker run -d --name rmqbroker -p 10911:10911 -p 10909:10909 -e "NAMESRV_ADDR=127.0.0.1:9876" apache/rocketmq:4.9.4 sh mqbroker autoCreateTopicEnable=true - - name: Wait for RocketMQ container to be ready + - name: Wait for RocketMQ namesrv container to be ready run: | docker exec rmqnamesrv sh -c 'while ! nc -z localhost 9876; do sleep 1; done' + + - name: Wait for RocketMQ broker container to be ready + run: | + docker exec rmqbroker sh -c 'while ! nc -z localhost 10911; do sleep 1; done' + + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }}