Skip to content

update=

update= #21

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:
- master
- 1.8.x
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 -pl sentinel-dashboard package -DskipTests -U -T 4C -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Publish to Docker Hub
run: |
echo "<settings><profiles><profile><id>github</id><properties><docker.username>$DOCKER_USERNAME</docker.username><docker.password>$DOCKER_PASSWORD</docker.password></properties></profile></profiles></settings>" > $GITHUB_WORKSPACE/settings.xml
chmod +x mvnw
./mvnw -ntp -Pgithub -pl sentinel-dashboard jib:build -Dimage=shiyindaxiaojie/sentinel-dashboard -Djib.disableUpdateChecks=true -DskipTests -U -T 4C -s $GITHUB_WORKSPACE/settings.xml
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}