Create build-push-docker.yml
This commit is contained in:
39
.github/workflows/build-push-docker.yml
vendored
Normal file
39
.github/workflows/build-push-docker.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# 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 Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the main branch
|
||||||
|
push:
|
||||||
|
# branches: [ main ]
|
||||||
|
tags: # tags 更新时触发 workflow
|
||||||
|
- 'v*'
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up JDK 11
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: '11'
|
||||||
|
distribution: 'temurin'
|
||||||
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||||
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||||
|
|
||||||
|
- name: Build Maven
|
||||||
|
run: mvn -B -DskipTests=true package --file pom.xml && \
|
||||||
|
ls && \
|
||||||
|
echo "--------------------------------------" && \
|
||||||
|
pwd
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user