Skip to content

Fix owner name

Fix owner name #31

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ghcr.io/prodyna/deployment-overview:latest
# if tag, get the tag as variable
- name: Set env
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
# if tagged, create docker tag
- name: Create a tag for the Docker image
if: github.ref == 'refs/heads/main'
run: docker tag ghcr.io/prodyna/deployment-overview:latest ghcr.io/prodyna/deployment-overview:${{ env.tag }}
# if tagged, push the image to the GitHub Container Registry
- name: Push the Docker image to the GitHub Container Registry
if: github.ref == 'refs/heads/main'
run: docker push ghcr.io/prodyna/deployment-overview:${{ env.tag }}