Skip to content

feat: support Redis password authentication #11

feat: support Redis password authentication

feat: support Redis password authentication #11

Workflow file for this run

name: Docker
on:
push:
branches:
- main
paths:
- "Dockerfile"
- "**.py"
- "requirements.txt"
- "static/**"
- "templates/**"
- "storage/**"
- ".github/workflows/docker.yml"
tags:
- "v*.*.*"
workflow_dispatch:
permissions:
contents: read
packages: write # push to GHCR
jobs:
build:
name: Build & push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# ── Multi-platform builder (amd64 + arm64) ────────────────────────────
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# ── Login to registries ───────────────────────────────────────────────
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
if: ${{ env.DOCKERHUB_TOKEN != '' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
# ── Tags & OCI labels ─────────────────────────────────────────────────
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/stackopshq/ghostbit
stackopshq/ghostbit
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=edge,branch=main
type=sha,prefix=sha-,format=short
labels: |
org.opencontainers.image.title=Ghostbit
org.opencontainers.image.description=Self-hosted, end-to-end encrypted paste service
org.opencontainers.image.vendor=StackOps HQ
org.opencontainers.image.licenses=MIT
org.opencontainers.image.documentation=https://docs.ghostbit.dev
# ── Build & push ──────────────────────────────────────────────────────
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max