因为之前一直用的别人开发的程序,但是现在更新了,要重新配置。
于是直接利用Action部署一个续期程序了。
图片[1]-利用Github action续期Micosoft 365-小N同学
fork仓库
首先,我们需要导入一下仓库: https://github.com/vcheckzen/KeepAliveE5.git
图片[2]-利用Github action续期Micosoft 365-小N同学
切记,仓库是选择私有的。
创建秘钥
访问 Personal Access Tokens (Classic) (github.com) 创建一个classic的token
图片[3]-利用Github action续期Micosoft 365-小N同学
按照我这样,然后创建。
图片[4]-利用Github action续期Micosoft 365-小N同学
复制并保存好这个token。
开启 Action
图片[5]-利用Github action续期Micosoft 365-小N同学
去仓库的settings,action项,选择Allow all actions and reusable workflows然后保存
创建secrets
图片[6]-利用Github action续期Micosoft 365-小N同学
图片[7]-利用Github action续期Micosoft 365-小N同学
在readme里面,已经告诉你要创建那三个secrets了
PAT是我们生成的token
USER是E5邮箱
PASSWD就是E5邮箱的密码
图片[8]-利用Github action续期Micosoft 365-小N同学
禁用安全默认值
详细步骤参考:在 Azure Active Directory 中提供默认安全级别 – Microsoft Entra | Microsoft Learn
图片[9]-利用Github action续期Micosoft 365-小N同学
图片[10]-利用Github action续期Micosoft 365-小N同学
浏览到“Azure Active Directory”>“属性”
图片[11]-利用Github action续期Micosoft 365-小N同学
- 选择“管理安全默认值”。
- 将“启用安全默认值”切换键设置为“否”。
- 选择“保存”.
启动 Action 的注册 APP 工作流
图片[12]-利用Github action续期Micosoft 365-小N同学
图片[13]-利用Github action续期Micosoft 365-小N同学
出现注册成功就是ok了。
启动 Action 的调用 API 工作流
图片[14]-利用Github action续期Micosoft 365-小N同学
图片[15]-利用Github action续期Micosoft 365-小N同学
调用成功就是完成了,然后每天都会自动调用!