Skip to content

Commit

Permalink
feat: print IP of gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Do1e committed Dec 19, 2024
1 parent f1da863 commit b089cd2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ fs.writeFileSync(opmlXmlPath, opmlXmlContent, { encoding: 'utf-8' });
// 异步处理
(async () => {

try {
// 获取服务器 IP 地址
const response = await fetch('https://ipapi.do1e.cn/get-ip');
const ipData = await response.json();
console.log(ipData);
} catch (err) {
console.log(err);
}

// 用于存储各项数据
const dataJson = [];

Expand Down

0 comments on commit b089cd2

Please sign in to comment.