Skip to content

Continuous deployment #121

Continuous deployment

Continuous deployment #121

name: Continuous deployment
on:
workflow_dispatch:
release:
types: [ published ]
jobs:
publish-docker:
name: Publish Docker
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
image: [ 'nealgeilen/epsilon-api', 'nealgeilen/epsilon-frontend' ]
include:
- image: 'nealgeilen/epsilon-api'
context: '.'
dockerfile: './Epsilon.Host.WebApi/Dockerfile'
- image: 'nealgeilen/epsilon-frontend'
context: './Epsilon.Host.Frontend'
dockerfile: './Dockerfile'
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Publish ${{ matrix.image }}
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: true
tags: |
${{ matrix.image }}:acc
${{ matrix.image }}:${{ github.sha }}
${{ !contains(github.sha, 'Beta') && 'latest' || '' }}