Update README.md #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
tags: [ "v*.*.*" ] | |
pull_request: | |
branches: [ master ] | |
release: | |
types: ["created"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
inputs: {} | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallelname: ci | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Need tags for Makefile logic to work | |
fetch-depth: 0 | |
- name: Build the Docker images | |
run: make image | |
deploy: | |
needs: [ "build" ] | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'release' && github.event.action == 'created' | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: actions/checkout@v2 | |
with: | |
# Need tags for Makefile logic to work | |
fetch-depth: 0 | |
- name: Build and Push Docker Images | |
run: make push |