From fbd60f378c7e05a407517c88760a153cb918dd42 Mon Sep 17 00:00:00 2001 From: AndrewMarchukov Date: Wed, 13 Jul 2022 23:39:33 +0400 Subject: [PATCH] fix --- .github/workflows/docker-image.yml | 38 ++++++++++++++++-------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2e5c39e..9be1dae 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,7 +5,7 @@ on: pull_request: branches: [ master ] schedule: - - cron: "0 23 * * *" + - cron: "0 * * * *" jobs: build: runs-on: ubuntu-latest @@ -22,8 +22,25 @@ jobs: else exit 1 fi - shell: /bin/bash -e {0} + shell: /bin/bash + - + name: Login to DockerHub + if: steps.status.outcome == 'success' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: build + if: steps.status.outcome == 'success' + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: andrewmhub/insurgency-sandstorm:latest - name: login to git + if: steps.status.outcome == 'success' run: | git config --global user.name 'Andrew Marchukov' git config --global user.email "${EMAIL}" @@ -37,19 +54,4 @@ jobs: - name: fetch from master run: git fetch origin master - name: push code to master - run: git push origin HEAD:master - - - name: Login to DockerHub - if: steps.status.outcome == 'success' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - if: steps.status.outcome == 'success' - uses: docker/build-push-action@v2 - with: - context: . - push: true - tags: andrewmhub/insurgency-sandstorm:latest \ No newline at end of file + run: git push origin HEAD:master \ No newline at end of file