Create docker-ghcr.yml

This commit is contained in:
Stef
2025-08-11 02:39:17 +02:00
committed by GitHub
parent 85728c47c1
commit d737e808eb

29
.github/workflows/docker-ghcr.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Build and Push to GHCR
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3.5.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/cal_counter:latest .
- name: Push Docker image
run: |
docker push ghcr.io/${{ github.repository_owner }}/cal_counter:latest