From b40945ee1d7772ce33d1610414c29b8b6664dee0 Mon Sep 17 00:00:00 2001 From: Mark Ettema Date: Fri, 27 Dec 2019 01:02:57 +0700 Subject: [PATCH] Use docker hub actions --- .github/workflows/dockerimage.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index c2a361c..909085f 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -10,13 +10,20 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag neothor/steam-open-id:$(date +%s) - - name: Push the Docker image - uses: jerray/publish-docker-action@master + + - name: Login to docker hub + if: success() + uses: actions-hub/docker/login@master + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build image + if: success() + run: docker build -t neothor/steam-open-id:${IMAGE_TAG} . + + - name: Push to docker registry + if: success() + uses: actions-hub/docker@master with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - registry: docker.pkg.github.com - repository: neothor/steam-open-id - auto_tag: true \ No newline at end of file + args: push neothor/steam-open-id:${IMAGE_TAG} \ No newline at end of file