Add coverage workflow and update README with coverage percentage #37
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: Publish Docker Image | |
on: | |
push: | |
pull_request: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
if: github.ref_name != 'main' | |
steps: | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y%m%d')" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push Docker Image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
tags: | | |
fvergaracl/game:latest | |
fvergaracl/game:${{ github.ref_name }} | |
fvergaracl/game:${{ github.ref_name }}.${{ steps.date.outputs.date }} | |
target: prod |