Skip to content

Update docker build

Update docker build #4

Workflow file for this run

name: Container Build
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker Login
uses: docker/login-action@v2.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ${{ env.REGISTRY }}/${{ github.repository }}:$(date -u +%Y-%m-%d)
- name: Push the Docker image
run: docker push ${{ env.REGISTRY }}/${{ github.repository }}:$(date -u +%Y-%m-%d)