新增 GitHub Actions 配置模板
This commit is contained in:
@ -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权限运行"
|
||||
|
Reference in New Issue
Block a user