Merge remote-tracking branch 'origin/V4.0' into V5 #125
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: Docker Image CI | |
| on: | |
| push: | |
| tags: | |
| - V* | |
| branches: [ "V5", "V4.0" ] | |
| pull_request: | |
| branches: [ "V5", "V4.0" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build with Maven | |
| run: mvn -B package --file publiccms-parent/pom.xml | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3.10.0 | |
| - name: login docker | |
| uses: docker/login-action@v3.4.0 | |
| with: | |
| username: ${{ vars.DOCKER_HUB_USERNAME}} | |
| password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
| - if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| name: Build and push Docker image | |
| uses: docker/build-push-action@v6.16.0 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| tags: sanluan/publiccms:${{ github.ref_name }},sanluan/publiccms:latest | |
| - if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| name: Build and push Docker image | |
| uses: docker/build-push-action@v6.16.0 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| tags: sanluan/publiccms:${{ github.ref_name }} |