Continuous deployment #121
Workflow file for this run
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
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' || '' }} | |