This commit is contained in:
AndrewMarchukov 2022-07-17 15:46:09 +04:00
parent 6a6ce218d5
commit 1c587b9b4b
2 changed files with 23 additions and 5 deletions

View file

@ -8,5 +8,5 @@ updates:
- package-ecosystem: "github-actions" - package-ecosystem: "github-actions"
directory: "/" directory: "/"
schedule: schedule:
interval: "daily" interval: "weekly"
open-pull-requests-limit: 10 open-pull-requests-limit: 10

View file

@ -2,13 +2,12 @@ name: Docker Image CI
on: on:
push: push:
branches: [ master ] branches: [ master ]
pull_request:
branches: [ master ]
schedule: schedule:
- cron: "0 * * * *" - cron: "0 * * * *"
jobs: jobs:
build: status-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event.pull_request.merged == false
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Check new version - name: Check new version
@ -65,4 +64,23 @@ jobs:
run: git fetch origin master run: git fetch origin master
- name: push code to master - name: push code to master
if: steps.status.outcome == 'success' if: steps.status.outcome == 'success'
run: git push origin HEAD:master 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