Initial commit
Build and Push Docker Image / build-and-push-image (push) Failing after 14m8s

This commit is contained in:
Pie
2026-04-19 17:08:09 +01:00
commit 47e66478c4
5 changed files with 534 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
name: Build and Push Docker Image
on:
push:
branches: [ "main", "master" ]
env:
# Gitea automatically sets GITEA_REPOSITORY to "owner/repo"
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
# Gitea's built-in container registry is usually on the same host
uses: docker/login-action@v3
with:
registry: git.home.piesweb.co.uk
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: git.home.piesweb.co.uk/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}