adding image tag

This commit is contained in:
2026-07-10 17:48:15 -03:00
parent fb6584ea84
commit e098b7e0c5
3 changed files with 11 additions and 6 deletions

View File

@@ -11,9 +11,10 @@ This repo provides reusable Gitea composite actions for homelab CI/CD pipelines.
Logs into the container registry, sets up SSH key for `docker-build.haven`, creates a remote Buildx context over SSH, and builds + pushes a multi-arch Docker image. Logs into the container registry, sets up SSH key for `docker-build.haven`, creates a remote Buildx context over SSH, and builds + pushes a multi-arch Docker image.
**Inputs:** **Inputs:**
- `image` (required) — full image ref without tag (`:latest` appended) - `image` (required) — full image ref without tag
- `registry_password` (required) — registry password/token (use secrets) - `registry_password` (required) — registry password/token (use secrets)
- `ssh_key` (required) — SSH private key for remote builder (use secrets) - `ssh_key` (required) — SSH private key for remote builder (use secrets)
- `image_tag` (default `latest`) — tag to apply to the built image
- `registry_host` (default `git.ivanch.me`) — container registry hostname - `registry_host` (default `git.ivanch.me`) — container registry hostname
- `registry_username` (default `ivanch`) — registry username - `registry_username` (default `ivanch`) — registry username
- `platforms` (default `linux/amd64,linux/arm64`) — target build platforms - `platforms` (default `linux/amd64,linux/arm64`) — target build platforms

View File

@@ -2,8 +2,6 @@
Reusable composite actions for Gitea Actions CI/CD pipelines in the homelab. Reusable composite actions for Gitea Actions CI/CD pipelines in the homelab.
> **Note:** Gitea cannot resolve actions the GitHub way (`ivanch/pipeline-actions/...`). Every `uses:` reference below must use the full URL form `https://git.ivanch.me/ivanch/pipeline-actions/<action>@main`.
## Actions ## Actions
### `build-and-push` ### `build-and-push`
@@ -22,6 +20,7 @@ jobs:
registry_password: ${{ secrets.REGISTRY_PASSWORD }} registry_password: ${{ secrets.REGISTRY_PASSWORD }}
ssh_key: ${{ secrets.SSH_KEY_DOCKERBUILD }} ssh_key: ${{ secrets.SSH_KEY_DOCKERBUILD }}
# optional — these have sensible defaults: # optional — these have sensible defaults:
# image_tag: latest
# registry_host: git.ivanch.me # registry_host: git.ivanch.me
# registry_username: ivanch # registry_username: ivanch
# platforms: linux/amd64,linux/arm64 # platforms: linux/amd64,linux/arm64
@@ -33,9 +32,10 @@ jobs:
| Input | Required | Default | Description | | Input | Required | Default | Description |
|---|---|---|---| |---|---|---|---|
| `image` | ✅ | — | Full image reference without tag (`:latest` is appended) | | `image` | ✅ | — | Full image reference without tag |
| `registry_password` | ✅ | — | Registry password/token (use secrets) | | `registry_password` | ✅ | — | Registry password/token (use secrets) |
| `ssh_key` | ✅ | — | SSH private key for the remote builder (use secrets) | | `ssh_key` | ✅ | — | SSH private key for the remote builder (use secrets) |
| `image_tag` | ❌ | `latest` | Tag to apply to the built image |
| `registry_host` | ❌ | `git.ivanch.me` | Container registry hostname | | `registry_host` | ❌ | `git.ivanch.me` | Container registry hostname |
| `registry_username` | ❌ | `ivanch` | Registry username | | `registry_username` | ❌ | `ivanch` | Registry username |
| `platforms` | ❌ | `linux/amd64,linux/arm64` | Target build platforms | | `platforms` | ❌ | `linux/amd64,linux/arm64` | Target build platforms |

View File

@@ -14,8 +14,12 @@ inputs:
description: Password / token for the container registry (pass via secrets) description: Password / token for the container registry (pass via secrets)
required: true required: true
image: image:
description: Full image reference (host/path/name) without tag — :latest is appended description: Full image reference (host/path/name) without tag
required: true required: true
image_tag:
description: Tag to apply to the built image
required: false
default: latest
platforms: platforms:
description: Comma-separated list of target platforms description: Comma-separated list of target platforms
required: false required: false
@@ -86,4 +90,4 @@ runs:
builder: remote-builder builder: remote-builder
platforms: ${{ inputs.platforms }} platforms: ${{ inputs.platforms }}
tags: | tags: |
${{ inputs.image }}:latest ${{ inputs.image }}:${{ inputs.image_tag }}