Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02e0616155 | ||
|
|
06a16c2e03 | ||
|
|
55582bb3f3 | ||
|
|
a7e5540122 | ||
|
|
7bd07463a3 | ||
|
|
5608f3e1f2 | ||
|
|
c5853938ff | ||
|
|
ee00b5db5d | ||
|
|
b660dc4613 | ||
|
|
8a6aacc70d | ||
|
|
9fefe96f7b |
@@ -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 }}
|
||||
@@ -2,7 +2,6 @@ name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branch: main
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
@@ -14,12 +13,28 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 0 # 必须抓取完整历史才能生成日志
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
|
||||
- run: npx changelogithub
|
||||
# 步骤 1: 本地生成 Changelog (不依赖 GitHub API)
|
||||
- name: Generate Changelog
|
||||
run: |
|
||||
npx conventional-changelog-cli -p angular -i CHANGELOG.md -s
|
||||
# 说明: 这会根据你的 commit 记录生成 CHANGELOG.md 文件
|
||||
|
||||
# 步骤 2: 发布 Release 到 Gitea
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
body_path: CHANGELOG.md # 把生成的内容作为 Release 的描述
|
||||
files: | # 如果你有构建产物想上传,写在这里
|
||||
# dist/app.js
|
||||
# build/*.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
GITHUB_TOKEN: ${{ secrets.GGITEA_PAT }}
|
||||
# 关键: 如果 softprops 无法自动识别 Gitea,有时需要指定 URL,
|
||||
# 但通常 Gitea Runner 会自动注入 GITHUB_API_URL 环境变量,
|
||||
# 所以大多数情况下直接用即可。
|
||||
+5
-5
@@ -15,14 +15,14 @@
|
||||
<meta property="og:title" content="NewsNow - 优雅的新闻聚合阅读器" />
|
||||
<meta property="og:description" content="实时新闻聚合阅读器,汇集全球热点新闻,提供优雅的阅读体验" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://newsnow.busiyi.world" />
|
||||
<meta property="og:image" content="https://newsnow.busiyi.world/og-image.png" />
|
||||
<meta property="og:url" content="https://hot.chgr.cc" />
|
||||
<meta property="og:image" content="https://hot.chgr.cc/og-image.png" />
|
||||
|
||||
<!-- Twitter Card Meta Tags -->
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="NewsNow - 优雅的新闻聚合阅读器" />
|
||||
<meta name="twitter:description" content="实时新闻聚合阅读器,汇集全球热点新闻,提供优雅的阅读体验" />
|
||||
<meta name="twitter:image" content="https://newsnow.busiyi.world/og-image.svg" />
|
||||
<meta name="twitter:image" content="https://hot.chgr.cc/og-image.svg" />
|
||||
|
||||
<meta name="theme-color" content="#F14D42" />
|
||||
<link rel="preload" href="/Baloo2-Bold.subset.ttf" as="font" type="font/ttf" crossorigin>
|
||||
@@ -34,8 +34,8 @@
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
"name": "NewsNow",
|
||||
"url": "https://newsnow.busiyi.world",
|
||||
"description": "实时新闻聚合阅读器,汇集全球热点新闻,提供优雅的阅读体验",
|
||||
"url": "https://hot.chgr.cc",
|
||||
"description": "实时新闻聚合阅读器,汇集全球热点新闻,提供优雅的阅读体验"
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://newsnow.busiyi.world/</loc>
|
||||
<loc>https://hot.chgr.cc/</loc>
|
||||
<lastmod>2025-01-18</lastmod>
|
||||
<changefreq>always</changefreq>
|
||||
<priority>1.0</priority>
|
||||
|
||||
Reference in New Issue
Block a user