restructure

This commit is contained in:
2026-05-29 11:16:00 -04:00
parent abeb9d04d0
commit 1ffe0c23cb
27 changed files with 14 additions and 14 deletions
+30
View File
@@ -0,0 +1,30 @@
# Docker Build and Push
<!-- action-docs-description source="action.yml" -->
## Description
Build a Docker image and push it to the Gitea container registry
<!-- action-docs-description source="action.yml" -->
<!-- action-docs-inputs source="action.yml" -->
## Inputs
| name | description | required | default |
| --- | --- | --- | --- |
| `REGISTRY` | <p>Container registry hostname</p> | `false` | `gitea.pixelparasol.com` |
| `REGISTRY_USERNAME` | <p>Registry login username</p> | `false` | `deac` |
| `REGISTRY_TOKEN` | <p>Registry login token or password</p> | `true` | `""` |
| `IMAGE_PATH` | <p>Full registry image path (e.g. gitea.pixelparasol.com/stat-tackler/stat-tackler-api)</p> | `true` | `""` |
| `IMAGE_TAG` | <p>Tag to apply in addition to latest (e.g. stage-<sha>)</p> | `true` | `""` |
| `PLATFORMS` | <p>Comma-separated buildx platform list</p> | `false` | `linux/amd64,linux/arm/v7,linux/arm64` |
| `ARTIFACT_NAME` | <p>Name of the build artifact to download</p> | `false` | `dist` |
| `ARTIFACT_PATH` | <p>Destination path for the downloaded artifact</p> | `false` | `dist` |
| `TAG_LATEST` | <p>Also tag and push the image as latest</p> | `false` | `false` |
| `WORKING_DIRECTORY` | <p>Working directory for the Docker build</p> | `false` | `.` |
<!-- action-docs-inputs source="action.yml" -->
<!-- action-docs-runs source="action.yml" -->
## Runs
This action is a `composite` action.
<!-- action-docs-runs source="action.yml" -->
+61
View File
@@ -0,0 +1,61 @@
name: Docker Build and Push
description: Build a Docker image and push it to the Gitea container registry
inputs:
REGISTRY:
description: "Container registry hostname"
default: "gitea.pixelparasol.com"
REGISTRY_USERNAME:
description: "Registry login username"
default: "deac"
REGISTRY_TOKEN:
description: "Registry login token or password"
required: true
IMAGE_PATH:
description: "Full registry image path (e.g. gitea.pixelparasol.com/stat-tackler/stat-tackler-api)"
required: true
IMAGE_TAG:
description: "Tag to apply in addition to latest (e.g. stage-<sha>)"
required: true
PLATFORMS:
description: "Comma-separated buildx platform list"
default: "linux/amd64,linux/arm/v7,linux/arm64"
ARTIFACT_NAME:
description: "Name of the build artifact to download"
default: "dist"
ARTIFACT_PATH:
description: "Destination path for the downloaded artifact"
default: "dist"
TAG_LATEST:
description: "Also tag and push the image as latest"
default: "false"
WORKING_DIRECTORY:
description: "Working directory for the Docker build"
default: "."
runs:
using: composite
steps:
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ inputs.REGISTRY }}
username: ${{ inputs.REGISTRY_USERNAME }}
password: ${{ inputs.REGISTRY_TOKEN }}
- name: Download Build Artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.ARTIFACT_NAME }}
path: ${{ inputs.ARTIFACT_PATH }}
- name: Docker Build and Push
shell: sh
run: |
TAGS="-t ${{ inputs.IMAGE_PATH }}:${{ inputs.IMAGE_TAG }}"
if [ "${{ inputs.TAG_LATEST }}" = "true" ]; then
TAGS="$TAGS -t ${{ inputs.IMAGE_PATH }}:latest"
fi
docker buildx build -f ${{ inputs.WORKING_DIRECTORY }}/Dockerfile ${{ inputs.WORKING_DIRECTORY }} \
--platform ${{ inputs.PLATFORMS }} \
--push \
$TAGS