From 90189391028d825d000c369e5da72309b0faa64e Mon Sep 17 00:00:00 2001 From: wlanboy Date: Sun, 21 Mar 2021 19:11:47 +0100 Subject: [PATCH] Update dockerpublish.yml --- .github/workflows/dockerpublish.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dockerpublish.yml b/.github/workflows/dockerpublish.yml index b489104..2bf30d2 100644 --- a/.github/workflows/dockerpublish.yml +++ b/.github/workflows/dockerpublish.yml @@ -14,14 +14,13 @@ jobs: java-version: 11 - name: Build with Maven run: mvn -B package --file pom.xml -DskipTests=true - - - uses: actions/checkout@master - name: Publish to Registry - 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" + DOCKER_USER: ${{secrets.DOCKER_USERNAME}} + DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} + run: | + docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + - name: Build the Docker image + run: docker build -t wlanboy/mirrorservice:latest . --build-arg JAR_FILE=./target/mirrorservice-0.1.1-SNAPSHOT.jar + - name: Docker Push + run: docker push wlanboy/mirrorservice:latest