| # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created |
| # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path |
| name: Redis runner example |
| on: push |
| |
| jobs: |
| # Label of the runner job |
| runner-job: |
| # You must use a Linux environment when using service containers or container jobs |
| runs-on: ubuntu-latest |
| permissions: |
| contents: read |
| packages: write |
| |
| steps: |
| # Downloads a copy of the code in your repository before running CI tests |
| - name: Create RocketMQ container |
| 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 |
| |
| - name: Wait for RocketMQ container to be ready |
| run: | |
| docker exec rmqnamesrv sh -c 'while ! nc -z localhost 9876; do sleep 1; done' |