From e1565c9957d22e3178cd336499e444694b0d0e80 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Sun, 29 Aug 2021 22:12:40 +0200 Subject: [PATCH] Build and push to Docker Hub on commits to master (#56) * Add Dockerhub CI job * Fix build * Change push branch to master --- .github/workflows/docker.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..37a41eb --- /dev/null +++ b/.github/workflows/docker.yml @@ -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