Skip to content

Commit

Permalink
Build and push to Docker Hub on commits to master (#56)
Browse files Browse the repository at this point in the history
* Add Dockerhub CI job

* Fix build

* Change push branch to master
  • Loading branch information
veteran29 authored Aug 29, 2021
1 parent 768550d commit e1565c9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Docker

on: [push]

jobs:
docker_release:
name: Docker release
runs-on: ubuntu-latest
if: (github.ref == 'refs/heads/master') && github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v1

- name: Login to registry
uses: actions-hub/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USR }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PAT }}

- name: Build ArmaforcesMissionBot
if: success()
run:
docker build -t armaforces/boderator:latest -f ./ArmaforcesMissionBot/Dockerfile .

- name: Push ArmaforcesMissionBot
if: success()
uses: actions-hub/docker@master
with:
args: push armaforces/boderator:latest

0 comments on commit e1565c9

Please sign in to comment.