diff --git a/.gitea/workflows/push.yaml b/.gitea/workflows/push.yaml index 05b5382..e709fa1 100644 --- a/.gitea/workflows/push.yaml +++ b/.gitea/workflows/push.yaml @@ -84,3 +84,38 @@ jobs: uses: actions/checkout@v4 - name: Run tailwindcss run: tailwindcss --input style/tailwind.css + + docker-build: + runs-on: ubuntu-latest-docker + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Gitea container registry + uses: docker/login-action@v4 + with: + registry: ${{ env.registry }} + username: ${{ env.actions_user }} + password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} + - name: Get Image Name + id: get-image-name + run: | + echo "IMAGE_NAME=$(echo ${{ env.registry }}/${{ gitea.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT + - name: Docker meta + id: meta + uses: docker/metadata-action@v6 + with: + images: ${{ steps.get-image-name.outputs.IMAGE_NAME }} + tags: | + type=sha + type=ref,event=branch + type=raw,value=latest,enable={{is_default_branch}} + - name: Build and push Docker image + uses: docker/build-push-action@v7 + with: + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max