Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50711a91f2 | ||
|
|
1b5fedd508 | ||
|
|
02e0616155 | ||
|
|
06a16c2e03 | ||
|
|
55582bb3f3 | ||
|
|
a7e5540122 | ||
|
|
7bd07463a3 | ||
|
|
5608f3e1f2 | ||
|
|
c5853938ff | ||
|
|
ee00b5db5d | ||
|
|
b660dc4613 | ||
|
|
8a6aacc70d |
@@ -1,4 +1,4 @@
|
||||
name: Publish Docker image
|
||||
name: Publish Docker image to Gitea
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -8,11 +8,12 @@ on:
|
||||
|
||||
jobs:
|
||||
build-docker:
|
||||
name: Push Docker image to multiple registries
|
||||
name: Build and push to Gitea Registry (Internal)
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
packages: write # 必须:允许写入软件包
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
@@ -22,19 +23,29 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
# 👇 告诉 Buildx 这个地址允许 HTTP (insecure)
|
||||
driver-opts: network=1panel-network
|
||||
config-inline: |
|
||||
[registry."172.18.0.21:3000"]
|
||||
http = true
|
||||
insecure = true
|
||||
|
||||
- name: Log in to the Container registry
|
||||
- name: Log in to Gitea Registry (Internal)
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
# ✅ 修改点1: 使用内网地址,避开 Cloudflare 和 WAF
|
||||
registry: 172.18.0.21:3000
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GGITHUB_TOKEN }}
|
||||
password: ${{ secrets.GGITEA_PAT }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
# ✅ 修改点2: 镜像名必须以 gitea:3000 开头,才能推送到内网注册中心
|
||||
# Gitea 会自动处理映射,你在外网依然可以用 git.chgr.cc 拉取
|
||||
images: 172.18.0.21:3000/${{ github.repository }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
@@ -46,4 +57,4 @@ jobs:
|
||||
linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
@@ -1,25 +0,0 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branch: main
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
|
||||
- run: npx changelogithub
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
Reference in New Issue
Block a user