Merge pull request #183 from Olog/code-coverage-it #29
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: Build and Publish Docker Image | |
# Publish Docker image on pushes to main branch, or on-demand. | |
on: | |
push: | |
branches: | |
- 'master' | |
workflow_dispatch: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get/Set Tag Info | |
id: project-info | |
run: ./scripts/write-project-info.sh && ./scripts/set-github-env.sh | |
- name: Print Tag Info | |
run: echo "Will build docker image for ${{ steps.project-info.outputs.IMAGE_TAG_LATEST }}, ${{ steps.project-info.outputs.IMAGE_TAG_VERSION }}, and ${{ steps.project-info.outputs.IMAGE_TAG_VERSION_TIMESTAMP }}" | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build, Tag, and Publish Docker Image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
tags: ${{ steps.project-info.outputs.IMAGE_TAG_LATEST }},${{ steps.project-info.outputs.IMAGE_TAG_VERSION }},${{ steps.project-info.outputs.IMAGE_TAG_VERSION_TIMESTAMP }} | |
push: true |