From 605638e1cc90222b222c471cd3e315e6079ae308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Wed, 18 Jun 2025 12:57:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20GitHub=20Actions=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h-hosts.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/h-hosts.sh b/h-hosts.sh index 1ed34f5..11e054f 100755 --- a/h-hosts.sh +++ b/h-hosts.sh @@ -3,6 +3,15 @@ # h-hosts.sh - 配置hosts文件脚本 # 用于添加指定域名解析记录到 /etc/hosts 文件 +# GitHub Actions 配置模板 +GITHUB_ACTIONS_CONFIG=' + steps: + - name: 配置 hosts + run: | + URL="https://Git.1-H.CC/Scripts/Linux/raw/branch/main/h-hosts.sh"; curl -fsSL "$URL" | bash +' + + # 检查是否有root权限 if [ "$EUID" -ne 0 ]; then echo "错误: 此脚本需要root权限运行"