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