From 1c587b9b4b3cf28552795f2503d7538b834aee25 Mon Sep 17 00:00:00 2001 From: AndrewMarchukov Date: Sun, 17 Jul 2022 15:46:09 +0400 Subject: [PATCH] fixes --- .github/dependabot.yml | 2 +- .github/workflows/docker-image.yml | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9245056..91ccc92 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,5 +8,5 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "daily" + interval: "weekly" open-pull-requests-limit: 10 diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index c49f1e0..32e0da0 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,13 +2,12 @@ name: Docker Image CI on: push: branches: [ master ] - pull_request: - branches: [ master ] schedule: - cron: "0 * * * *" jobs: - build: + status-build: runs-on: ubuntu-latest + if: github.event.pull_request.merged == false steps: - uses: actions/checkout@v3 - name: Check new version @@ -65,4 +64,23 @@ jobs: run: git fetch origin master - name: push code to master if: steps.status.outcome == 'success' - run: git push origin HEAD:master \ No newline at end of file + run: git push origin HEAD:master + build: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true + steps: + - uses: actions/checkout@v3 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: build + uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: andrewmhub/insurgency-sandstorm:latest \ No newline at end of file