Fix owner name #31
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: 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 }} |