fix jaeger

This commit is contained in:
weyu 2025-03-29 16:34:13 +08:00
parent d1766bc509
commit 96d50b20f0
3 changed files with 64 additions and 13 deletions

51
.github/workflows/coredns.yml vendored Normal file
View File

@ -0,0 +1,51 @@
name: To-To-To CoreDNS
on:
schedule:
- cron: "15 3 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: CoreDNS To-To-To
run: |
set -x
source libs/aliyun.sh
install_aliyun_ossutil
initdir=`pwd`
source ${initdir}/libs/common.sh
cat ${initdir}/sed/* > ${initdir}/toto.sed
for project in "https://github.com/coredns/coredns.io.git"
do
uuid=`date "+%s%N"`
workdir="${initdir}/tmp/${uuid}"
mkdir -p $workdir
git clone $project $workdir
ls $workdir
find ./webs -name toto.sh -exec /bin/bash {} $workdir $initdir \;
src=`cat ${workdir}/ret-data|grep -v ^$|head -n 1|awk -F'&' '{print $1}'`
dest=`cat ${workdir}/ret-data|grep -v ^$|head -n 1|awk -F'&' '{print $2}'`
ls -lha $src
if [ -f "${src}/index.html" ];then
echo "=============================================> 构建成功上传文件到OSS"
./ossutil --access-key-id ${{ secrets.ALIYUN_CYG_OSS_AK }} --access-key-secret ${{ secrets.ALIYUN_CYG_OSS_SK }} --endpoint ${{ secrets.ALIYUN_CYG_OSS_ENDPOINT }} --region ${{ secrets.ALIYUN_CYG_OSS_REGION }} cp -fr $src $dest
else
echo "=============================================> 没有构建出 index.html 文件"
continue
fi
done

View File

@ -67,7 +67,7 @@ install_postcss(){
check_cdn_change(){
echo "=============================================> 以下文件进行了 cdn 替换,请确认文件在 https://cdn.cncfstack.com 是否存在"
grep "cdn.cncfstack.com" ./* -R |grep -v "otocn\.sed"
grep "cdn.cncfstack.com" ./* -R |grep -v "otocn\.sed"|awk -F':' '{print $1}'
}
@ -75,7 +75,7 @@ check_not_change(){
echo "=============================================> 以下可能的外部文件未被处理"
# 有些图标表情使用 CDN 的 SVG这类也可以代理。TODO有些svg中会包含地址这类是不需要处理的但是会grep出来。不移除会有大量的无效信息还是不显示svg内容根据实际情况单独处理
# raw.githubusercontent.com 是 github 的内容,太多输出了,有依赖单独处理吧
grep -iE "(maxcdn.bootstrapcdn.com|code.jquery.com|cdnjs.cloudflare.com|cdn-images.mailchimp.com|cdn.jsdelivr.net|fonts.googleapis.com|unpkg.com|www.googletagmanager.com)" ./* -R |grep -vE "(\.sh\:|\.md\:|\.toml|index\.rss\.xml|README\.txt\:|otocn\.sed\:|\.svg\:|node_modules)"
grep -iEo "(maxcdn.bootstrapcdn.com|code.jquery.com|cdnjs.cloudflare.com|cdn-images.mailchimp.com|cdn.jsdelivr.net|fonts.googleapis.com|unpkg.com|www.googletagmanager.com)" ./* -R |grep -vE "(\.sh\:|\.md\:|\.toml|index\.rss\.xml|README\.txt\:|otocn\.sed\:|\.svg\:|node_modules)"
}

View File

@ -8,8 +8,7 @@ before_jaeger_website(){
install_postcss
# 添加网站访问统计
echo '<script defer src="https://umami.cncfstack.com/script.js" data-website-id="ad128657-afe1-4074-aa5e-279f72db2a62"></script>' >> layouts/partials/favicons.html
#echo '<script defer src="https://umami.cncfstack.com/script.js" data-website-id="ad128657-afe1-4074-aa5e-279f72db2a62"></script>' >> layouts/partials/favicons.html
}
@ -17,15 +16,16 @@ before_jaeger_website(){
after_jaeger_website(){
#command = "make netlify-production-build"
mkdir output
hugo \
--destination ./output \
--cleanDestinationDir \
--minify \
--gc \
--enableGitInfo \
--baseURL https://jaeger.cncfstack.com
make generate
make netlify-production-build
# mkdir output
# hugo \
# --destination ./output \
# --cleanDestinationDir \
# --minify \
# --gc \
# --enableGitInfo \
# --baseURL https://jaeger.cncfstack.com
}