Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gp187 authored Apr 23, 2020
1 parent 7f6821f commit 569baeb
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy to docker hub

on:
push:
branches:
- master
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}

0 comments on commit 569baeb

Please sign in to comment.