bugfix #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: 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/[email protected] | |
- name: login docker | |
uses: docker/[email protected] | |
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/[email protected] | |
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/[email protected] | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: sanluan/publiccms:${{ github.ref_name }} |