del
This commit is contained in:
parent
017c239fb9
commit
ac7e7f5a64
1 changed files with 0 additions and 72 deletions
72
.github/workflows/docker-release.yml
vendored
72
.github/workflows/docker-release.yml
vendored
|
|
@ -1,72 +0,0 @@
|
||||||
name: 🐳 Build & Push Docker Image
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
version:
|
|
||||||
description: "Image version tag (e.g. v0.2.0, latest)"
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
default: "latest"
|
|
||||||
|
|
||||||
env:
|
|
||||||
GHCR_REGISTRY: ghcr.io
|
|
||||||
GHCR_IMAGE_NAME: ${{ github.repository_owner }}/picoclaw
|
|
||||||
ALIYUN_REGISTRY: registry.cn-beijing.aliyuncs.com
|
|
||||||
ALIYUN_IMAGE_NAME: ${{ secrets.ALIYUN_NAMESPACE }}/picoclaw
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docker-build:
|
|
||||||
name: 🏗️ Build Docker Image
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# ── Checkout ──────────────────────────────
|
|
||||||
- name: 📥 Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# ── Docker Buildx ─────────────────────────
|
|
||||||
- name: 🔧 Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
# ── Login to GHCR ─────────────────────────
|
|
||||||
- name: 🔑 Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.GHCR_REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
# ── Login to Aliyun ───────────────────────
|
|
||||||
- name: 🔑 Login to Aliyun Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.ALIYUN_REGISTRY }}
|
|
||||||
username: ${{ secrets.ALIYUN_USERNAME }}
|
|
||||||
password: ${{ secrets.ALIYUN_PASSWORD }}
|
|
||||||
|
|
||||||
# ── Metadata (tags & labels) ──────────────
|
|
||||||
- name: 🏷️ Prepare image tags
|
|
||||||
id: tags
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
version="${{ inputs.version }}"
|
|
||||||
echo "ghcr_tag=${{ env.GHCR_REGISTRY }}/${{ env.GHCR_IMAGE_NAME }}:${version}" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "aliyun_tag=${{ env.ALIYUN_REGISTRY }}/${{ env.ALIYUN_IMAGE_NAME }}:${version}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
# ── Build & Push ──────────────────────────
|
|
||||||
- name: 🚀 Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./docker/Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
${{ steps.tags.outputs.ghcr_tag }}
|
|
||||||
${{ steps.tags.outputs.aliyun_tag }}
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
platforms: linux/amd64,linux/arm64,linux/riscv64
|
|
||||||
Loading…
Add table
Reference in a new issue