main.py 663 B

12345678910111213141516171819202122
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. '''
  4. @Contact : liuyuqi.gov@msn.cn
  5. @Time : 2023/11/13 15:27:04
  6. @License : Copyright © 2017-2022 liuyuqi. All Rights Reserved.
  7. @Desc : enter point
  8. '''
  9. from set_github_secret import GithubApi
  10. import json
  11. if __name__=='__main__':
  12. with open("account.json", "r") as file:
  13. data = json.load(file)
  14. owner=data["owner"]
  15. token=data["token"]
  16. repo = data["repo"]
  17. github_api = GithubApi(owner=owner, token=token, repo=repo)
  18. for i in data["secret"]:
  19. key=i["key"]
  20. value=i["value"]
  21. github_api.set_update_github_secret(key, value)