Migrate container publishing to Gitea Actions
Build and Push Docker Image / build (push) Successful in 56s

This commit is contained in:
Ketan Patel committed 2026-09-30 20:36:29 -04:00
1 parent 02acbb1664
commit 943636c39d
4 files changed
+73 -35

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
.git
.github
.gitea
.remember
.env
.DS_Store
+54
View File
@@ -0,0 +1,54 @@
name: Build and Push Docker Image
on:
push:
branches: [main]
schedule:
- cron: '0 0 3 * *' # Monthly on the third day, at midnight UTC.
workflow_dispatch:
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: 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: .
platforms: linux/amd64
pull: true
push: true
load: false
tags: docker.io/k2patel/rtorrent:latest
labels: |
org.opencontainers.image.source=https://git.k2patel.in/k2patel/docker-rtorrent
org.opencontainers.image.revision=${{ github.sha }}
-35
View File
@@ -1,35 +0,0 @@
name: Build and Push Docker 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:
schedule:
- cron: '0 0 3 * *' # This runs at midnight on the first day of every month
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set Image name
run: |
echo "IMAGE_NAME=k2patel/rtorrent:latest" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build the Docker image
id: build
run: |
docker build . -t ${{ env.IMAGE_NAME }}
- name: Push the Docker image
run: docker push ${{ env.IMAGE_NAME }}
+13
View File
@@ -1,5 +1,18 @@
# docker-rtorrent
This is plain simple rtorrent with proxy and custom rtorrent.rc
Source: https://git.k2patel.in/k2patel/docker-rtorrent
Gitea Actions builds and publishes `docker.io/k2patel/rtorrent:latest`
on pushes to `main`, manually, and monthly on the third day at 00:00 UTC.
The repository requires Actions secrets `DOCKER_USERNAME` and `DOCKER_TOKEN`
(a Docker Hub token with write access to `k2patel/rtorrent`).
Builds run on the remote Kubernetes runner for `linux/amd64`, matching the
previous GitHub build. Buildx pushes directly to Docker Hub without loading
the image into the runner's Docker image store. Its temporary builder and
build cache are removed after each job; no image archives or build records
are uploaded to Gitea, and no local container builds are required.
# Latest 0.16 version caveat
- since version 0.16 explicitly set `network.bind_address.set = 0.0.0.0`, when ipv6 is disabled on kernel.