Update README.md (#742) #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto Deploy Docker | |
| on: | |
| push: | |
| branches: [ "2.10","2.11" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-qemu-action@v3 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Cache Maven Repository | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | |
| - name: Build with Maven | |
| run: ./mvnw clean install -Dmaven.build.timestamp="$(date "+%Y-%m-%d %H:%M:%S")" -Dmaven.test.skip=true -Pbuild | |
| - name: Get Maven project version | |
| id: maven-version | |
| run: | | |
| VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Project version: $VERSION" | |
| - name: Log in to Aliyun ACR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: registry.cn-shenzhen.aliyuncs.com | |
| username: ${{ secrets.ALIYUN_DOCKER_REPO_USERNAME }} | |
| password: ${{ secrets.ALIYUN_DOCKER_REPO_PWD }} | |
| - name: build and docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./jetlinks-standalone | |
| file: ./jetlinks-standalone/Dockerfile | |
| platforms: linux/amd64,linux/arm64/v8 | |
| push: true | |
| tags: | | |
| registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-community:${{ steps.maven-version.outputs.version }} |