Skip to content

Add GitHub Actions workflows for Docker image build and release, and … #1

Add GitHub Actions workflows for Docker image build and release, and …

Add GitHub Actions workflows for Docker image build and release, and … #1

name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest .
- name: Push Docker image
run: |
docker push ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest