Added workflow
Build & Deploy / build (push) Failing after 36s

This commit is contained in:
2026-07-07 16:30:00 +02:00
parent 7e3e1be47a
commit bfa0115f98
+26
View File
@@ -0,0 +1,26 @@
# This workflow builds and deploys DiscDrop whenever code is pushed to main.
# The runner has Docker socket access so it can manage containers on the host.
# See: https://docs.gitea.com/usage/actions
name: Build & Deploy
run-name: Build ${{ gitea.sha.substring(0, 7) }}
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t ${{ env.IMAGE_NAME }}:${{ gitea.sha }} .
docker tag ${{ env.IMAGE_NAME }}:${{ gitea.sha }} ${{ env.IMAGE_NAME }}:latest
- name: Clean up old images
run: docker image prune -f --filter "until=24h"