Skip to content

Commit

Permalink
Create dockerpublish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wlanboy authored Apr 13, 2020
1 parent 5c71e9d commit 165220b
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/dockerpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Docker build and publish image
on:
watch:
types: [started]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
if: github.actor == github.event.repository.owner.login
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven
run: mvn -B package --file pom.xml -DskipTests=true

- uses: actions/checkout@master
- name: Publish to Registry
if: github.actor == github.event.repository.owner.login
uses: elgohr/Publish-Docker-Github-Action@master
env:
JAR_FILE: ./target/mirrorservice-0.1.1-SNAPSHOT.jar
with:
name: wlanboy/mirrorservice
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest"

0 comments on commit 165220b

Please sign in to comment.