Migrate Flood container publishing to Gitea Actions
Build and Push Custom Flood Image / build (push) Successful in 46s

This commit is contained in:
k2patel committed 2026-09-30 20:58:49 -04:00
1 parent 4267ac56e4
commit 1c37ec4e96
3 files changed
+88 -52

No files matched your search

+70
View File
@@ -0,0 +1,70 @@
name: Build and Push Custom Flood Image
on:
push:
branches: [main]
workflow_dispatch:
inputs:
flood_version:
description: 'jesec/flood release tag'
required: true
default: 'v4.16.2'
type: string
jobs:
build:
runs-on: kube
if: github.ref == 'refs/heads/main'
env:
DOCKER_BUILD_RECORD_UPLOAD: 'false'
DOCKER_BUILD_SUMMARY: 'false'
steps:
- name: Checkout code
uses: https://github.com/actions/checkout@v4
with:
persist-credentials: false
- name: Fetch Flood release
env:
FLOOD_VERSION: ${{ github.event.inputs.flood_version || 'v4.16.2' }}
run: |
git check-ref-format "refs/tags/$FLOOD_VERSION"
git init flood-repo
git -C flood-repo fetch --depth=1 https://github.com/jesec/flood.git "refs/tags/$FLOOD_VERSION"
git -C flood-repo checkout --detach FETCH_HEAD
cp Dockerfile.client flood-repo/Dockerfile.client
printf '\n.git\n.github\n.env\n' >> flood-repo/.dockerignore
- name: Install Docker CLI
run: |
apt-get update
apt-get install -y --no-install-recommends docker.io
rm -rf /var/lib/apt/lists/*
- name: Log in to Docker Hub
uses: https://github.com/docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set up temporary builder
uses: https://github.com/docker/setup-buildx-action@v3
with:
driver: docker-container
cache-binary: false
keep-state: false
cleanup: true
- name: Build and push to Docker Hub
uses: https://github.com/docker/build-push-action@v6
with:
context: ./flood-repo
file: ./flood-repo/Dockerfile.client
platforms: linux/amd64
pull: true
push: true
load: false
tags: docker.io/k2patel/floodui:latest
labels: |
org.opencontainers.image.source=https://git.k2patel.in/k2patel/docker-flood-client
org.opencontainers.image.revision=${{ github.sha }}
-51
View File
@@ -1,51 +0,0 @@
name: Build and Push Custom Flood Image
# This workflow is manually triggered from the "Actions" tab in GitHub.
# It requires a single input: the version tag of the flood repository to use.
on:
workflow_dispatch:
inputs:
flood_version:
description: 'New release version for jesec/flood (e.g., v4.4.1)'
required: true
type: string
jobs:
build_and_push_image:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the current repository (where this workflow and Dockerfile.client live)
- name: Checkout custom Dockerfile repo
uses: actions/checkout@v4
# Step 2: Checkout the flood repository to the specified version
# The checkout will be placed in a subdirectory called 'flood-repo'
- name: Checkout jesec/flood release
uses: actions/checkout@v4
with:
repository: jesec/flood
ref: ${{ github.event.inputs.flood_version }}
path: flood-repo
# Step 3: Copy the custom Dockerfile into the flood repository's directory
- name: Copy custom Dockerfile
run: cp Dockerfile.client ./flood-repo/Dockerfile.client
# Step 4: Login to Docker Hub using the secrets
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
# Step 5: Build and push the Docker image
# This assumes a docker-compose.yml exists in flood-repo and uses Dockerfile.
# It will build, tag, and push the image to your Docker Hub account.
- name: Build and push with Docker Compose
working-directory: ./flood-repo
run: |
# Use the 'docker compose' command to build and push the image.
# The image is tagged with the version provided in the workflow input.
# You might need to adjust the service name (e.g., 'flood') to match your docker-compose.yml
docker buildx build -t 'k2patel/floodui' -f ./Dockerfile.client .
docker push 'k2patel/floodui'
+18 -1
View File
@@ -1,2 +1,19 @@
# docker-flood-client # docker-flood-client
Flood Client only
Flood client image. Source: https://git.k2patel.in/k2patel/docker-flood-client
Public access is read-only; account registration on this server is disabled.
Report issues at https://github.com/k2patel/docker-flood-client/issues.
For contributions, open an issue with a link to your branch or patch on another
Git provider. Changes are reviewed and applied by the maintainer on Gitea.
Gitea Actions publishes `docker.io/k2patel/floodui:latest` on pushes to `main`
and manual runs. The default Flood release is `v4.16.2`; manual runs can select
another release with `flood_version`. Builds use the custom `Dockerfile.client`.
Set Actions secrets `DOCKER_USERNAME` and `DOCKER_TOKEN` with Docker Hub write
access to `k2patel/floodui`. Builds run remotely on the Kubernetes runner for
`linux/amd64`, pushing directly to Docker Hub. Images are not loaded into the
runner image store, and the temporary builder and cache are removed afterward.
No image archives or build records are uploaded to Gitea, and no local container
builds are required.