Skip to content

Commit

Permalink
Merge pull request ddgth#109 from dysf888/master
Browse files Browse the repository at this point in the history
新增支持Actions自选更新V4或V6
  • Loading branch information
ddgth authored Dec 20, 2022
2 parents 77ee326 + 7b117ce commit 47520f7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
schedule:
- cron: '*/16 * * * *'

env:
UPDATE_IPV4: false
UPDATE_IPV6: false
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -19,10 +22,21 @@ jobs:
python-version: 3.7
- name: 'Install dependencies'
run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: 'run cf2dns'
- name: 'run cf2dns v4'
if: env.UPDATE_IPV4 == 'true' && !cancelled()
env:
KEY: ${{ secrets.KEY }}
DOMAINS: ${{ secrets.DOMAINS }}
SECRETID: ${{ secrets.SECRETID }}
SECRETKEY: ${{ secrets.SECRETKEY }}
run: python cf2dns_actions.py
- name: 'run cf2dns v6'
if: env.UPDATE_IPV6 == 'true' && !cancelled()
env:
KEY: ${{ secrets.KEY }}
DOMAINS: ${{ secrets.DOMAINSV6 }}
SECRETID: ${{ secrets.SECRETID }}
SECRETKEY: ${{ secrets.SECRETKEY }}
run: |
sed -i "s/TYPE = 'v4'/TYPE = 'v6'/" cf2dns_actions.py
python cf2dns_actions.py
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 新增支持Actions自选更新V4或V6 ——update 2022.12.19
> 使用方法
1. 修改 **`.github/workflows/run.yml`**

2. 新增secret **`DOMAINSV6`**
### 新增支持华为云DNS ——update 2022.10.25
> 使用方法
Expand Down Expand Up @@ -87,6 +93,7 @@ python cf2dns.py
3. 进入第二步中Fork的项目,点击Settings->Secrets-New secret,分别是DOMAINS,KEY,SECRETID,SECRETKEY。

> - DOMAINS 需改域名信息,填写时注意不要有换行 例如:`{"hostmonit.com": {"@": ["CM","CU","CT"], "shop": ["CM", "CU", "CT"], "stock": ["CM","CU","CT"]},"4096.me": {"@": ["CM","CU","CT"], "vv":["CM","CU","CT"]}}`
> - DOMAINSV6 如果需要更新AAA解析请增加此secrets,格式同DOMAINS。
> - KEY API密钥,从[商店](https://shop.hostmonit.com)购买KEY,也可以使用这个KEY `o1zrmHAF` ,区别是 `o1zrmHAF` 是历史优选的Cloudflare IP(也可以从这个[网站](https://stock.hostmonit.com/CloudFlareYes)查到IP的信息),而购买的KEY是15分钟内获取到的对各运营商速度最优的的Cloudflare IP
> - SECRETID 第一部中从[腾讯云后台](https://console.cloud.tencent.com/cam/capi)或者[阿里云后台](https://help.aliyun.com/document_detail/53045.html?spm=a2c4g.11186623.2.11.2c6a2fbdh13O53),获取到的 `SECRETID `
> - SECRETKEY 第一部中从[腾讯云后台](https://console.cloud.tencent.com/cam/capi)或者[阿里云后台](https://help.aliyun.com/document_detail/53045.html?spm=a2c4g.11186623.2.11.2c6a2fbdh13O53),获取到的 `SECRETKEY`
Expand Down

0 comments on commit 47520f7

Please sign in to comment.