Added deploy action to docker hub

This commit is contained in:
darmiel 2021-04-05 11:37:28 +02:00
parent 31c3837fbe
commit d9cf410cdb

32
.github/workflows/deploy_hub_tags.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Deploy to docker hub (v-tag)
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Login to docker hub
if: success()
uses: actions-hub/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Build image
if: success()
run: docker build -t ${GITHUB_REPOSITORY}:${IMAGE_TAG} .
- name: Push to docker registry
if: success()
uses: actions-hub/docker@master
with:
args: push ${GITHUB_REPOSITORY}:${IMAGE_TAG}