Update worckflow
Some checks failed
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 31s
Build and Push Docker Image / build-and-push (push) Failing after 3m18s

This commit is contained in:
jafreli
2025-07-19 00:57:14 +02:00
parent f714fa46ba
commit 72da152f93
2 changed files with 44 additions and 2 deletions

View File

@@ -0,0 +1,35 @@
name: Build and Push Docker Image (Simple)
on:
push:
branches:
- main
- master
env:
REGISTRY: git.out.jafre.li
IMAGE_NAME: habit-tracker
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t ${{ env.REGISTRY }}/${{ gitea.repository_owner }}/${{ env.IMAGE_NAME }}:latest .
- name: Log in to Container Registry
run: |
echo "${{ secrets.TOKEN }}" | docker login ${{ env.REGISTRY }} -u ${{ gitea.repository_owner }} --password-stdin
- name: Push Docker image
run: |
docker push ${{ env.REGISTRY }}/${{ gitea.repository_owner }}/${{ env.IMAGE_NAME }}:latest
- name: Cleanup
run: |
docker rmi ${{ env.REGISTRY }}/${{ gitea.repository_owner }}/${{ env.IMAGE_NAME }}:latest || true