Skip to content

ci: fix compile error. #33

ci: fix compile error.

ci: fix compile error. #33

Workflow file for this run

# 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: DockerImage
on:
release:
types: [created]
push:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**/*'
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**/*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
java-version: 8.0.302+8
distribution: 'temurin'
server-id: javafamily-central # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Install parent
run: mvn clean install -N
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTER_USER_NAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTER_PASSWORD }}
- name: Compile and publish to docker hub
run: |
docker login -u javafamily -p ${{ secrets.JF_DOCKER_HUB_PWD }}
mvn clean verify -DDOCKER_ACCOUNT=$DOCKER_ACCOUNT -DDOCKER_PWD=$DOCKER_PWD
docker logout
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTER_USER_NAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTER_PASSWORD }}