Skip to content

[maven-release-plugin] prepare for next development iteration #54

[maven-release-plugin] prepare for next development iteration

[maven-release-plugin] prepare for next development iteration #54

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: Maven CI
on:
push:
branches:
- main
- 3.*
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
build:
name: Build on java ${{ matrix.java }}
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
packages: write
strategy:
matrix:
java: ['8']
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
check-latest: true
distribution: 'temurin'
server-id: github
settings-path: ${{ github.workspace }}
- name: Build with Maven
run: |
chmod +x mvnw
./mvnw -ntp package -DskipTests -U -T 4C -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Publish to Docker Hub
run: |
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker build -f docker/Dockerfile -t $DOCKER_IMAGE:$DOCKER_VERSION -t $DOCKER_IMAGE:latest .
docker push $DOCKER_IMAGE:$DOCKER_VERSION
docker push $DOCKER_IMAGE:latest
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_IMAGE: shiyindaxiaojie/cat-home
DOCKER_VERSION: v3.3.2