revert: remove .github/workflows/admin-web-docker.yml (did not exist at 29caf1a)
All checks were successful
CI / Admin Web CI (push) Has been skipped
CI / Detect Changes (push) Successful in 4s
CI / YouTube Worker (push) Has been skipped
CI / Deploy (push) Has been skipped

This commit is contained in:
2026-07-11 23:23:06 +02:00
parent 43ae501e17
commit 083b1436a0

View File

@@ -1,109 +0,0 @@
# =============================================================================
# TabataGo — Admin Web Docker Build & Push to Gitea Container Registry
# =============================================================================
#
# Gitea Registry URL: gitea.1000co.fr/millianlmx/tabatago/admin-web
#
# Required secrets:
# PR_API_TOKEN — Gitea PAT (must have read:package + write:package scopes)
# =============================================================================
name: Admin Web — Docker Build & Push
on:
push:
branches: [main]
paths:
- 'admin-web/**'
- '.github/workflows/admin-web-docker.yml'
pull_request:
branches: [main]
paths:
- 'admin-web/**'
- '.github/workflows/admin-web-docker.yml'
env:
REGISTRY: gitea.1000co.fr
IMAGE_NAME: ${{ github.repository }}/admin-web
jobs:
build-and-push:
name: Build & Push Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# ── Metadata: image tags & labels ──
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix=,format=short
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
labels: |
org.opencontainers.image.title=TabataGo Admin Web
org.opencontainers.image.description=Next.js admin dashboard for TabataGo
org.opencontainers.image.vendor=Millian LMX
# ── Login to Gitea Container Registry ──
- name: Login to Gitea Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.PR_API_TOKEN }}
# ── Build & Push ──
- name: Build and push
uses: docker/build-push-action@v6
with:
context: admin-web
file: admin-web/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64
# ── PR comment with image info ──
- name: Post PR image info
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const sha = context.sha.substring(0, 7);
const image = `${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:pr-${{ github.event.pull_request.number }}`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: [
'## 🐳 Docker Image Built',
'',
'| | |',
'|---|---|',
`| **Image** | \`${image}\` |`,
`| **Commit** | \`${sha}\` |`,
'',
'Pull the image:',
'```bash',
`docker pull ${image}`,
'```',
].join('\n')
});