From 77fab65d82297523da4459d813593231dd300a75 Mon Sep 17 00:00:00 2001 From: simojenki Date: Mon, 23 Aug 2021 22:01:56 +1000 Subject: [PATCH] Updating master workflow --- .github/workflows/master.yml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 1bc1c6c..f35c5d3 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -23,12 +23,28 @@ jobs: name: Push Docker image to Docker Hub runs-on: ubuntu-latest steps: - - name: Check out the repo + - + name: Check out the repo uses: actions/checkout@v2 - - name: Push to Docker Hub - uses: docker/build-push-action@v1 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - repository: simojenki/bonob - tag_with_ref: true + images: simojenki/bonob + - + name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Push to Docker Hub + uses: docker/build-push-action@v2 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: latest +