Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate version submittion thanks to Kodi addon submitter #41

Open
thomas-ernest opened this issue Aug 15, 2023 · 8 comments
Open

Automate version submittion thanks to Kodi addon submitter #41

thomas-ernest opened this issue Aug 15, 2023 · 8 comments

Comments

@thomas-ernest
Copy link
Contributor

It is possible to use https://github.com/xbmc/kodi-addon-submitter in GitHub workflow in order to submit PR to official Kodi repository.
I plugged it in my addon for exampel : https://github.com/thomas-ernest/plugin.video.arteplussept/blob/master/.github/workflows/release-addon.yml#L10-L18
I also see this example : https://github.com/romanvm/kodi.tvmaze/blob/master/.github/workflows/publish-addon.yml#L35
There is a need to create a GitHub token (with a validity period) and set it as a secret in the current repo.

@thomas-ernest
Copy link
Contributor Author

There is a need to create a GitHub token (with a validity period) and set it as a secret in the current repo.

@joaopa00 ? Would you be able to create an access token for the repo please ? https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens

If so, I can try to add kodi addon submitter https://github.com/xbmc/kodi-addon-submitter .

@joaopa00
Copy link
Contributor

Ummm I do not understand what you mean. I have a personal token for all my github repos (personal and CUTVM)
But I do not understand how to create one for CUTVM repo

@thomas-ernest
Copy link
Contributor Author

Sorry I made a shortcut.
You need a token (rather the one for CUTVM) only with access to public repo. No other permission needed.
The token value needs to be saved in a Secret attached to the repository with the action submitting the new addon version.

The GitHub action kodi submitter use this secret containing the token to auth and create the PR in kodi repo via GitHub API.

@joaopa00
Copy link
Contributor

REPO_TOKEN looks already created
Screenshot_20231010_120746

@thomas-ernest
Copy link
Contributor Author

Great ! I will try with this secret soon and keep you posted.

thomas-ernest added a commit to thomas-ernest/resource.images.catchuptvandmore that referenced this issue Oct 16, 2023
@thomas-ernest
Copy link
Contributor Author

thomas-ernest commented Oct 16, 2023

Please note I also had to create a secret EMAIL to make the job work.
More details in PR.

@thomas-ernest
Copy link
Contributor Author

thomas-ernest commented Oct 17, 2023

Hello @joaopa00,

Thank you for merging #44, but the build fail, because secret EMAIL is missing.

See error message in logs https://github.com/Catch-up-TV-and-More/resource.images.catchuptvandmore/actions/runs/6541261959/job/17762519552 :

Traceback (most recent call last):
  File "/usr/local/bin/submit-addon", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/addon_submitter/__main__.py", line 70, in main
    bool(gh_username), bool(gh_token), bool(user_email)
addon_submitter.utils.AddonSubmissionError: GitHub username, token and user email must be specified either via environment variables or as command line arguments.
Provided parameters:
GitHub username: True, GitHub token: True, user email: False

@joaopa00
Copy link
Contributor

I think I have done. I will close this issue when we release a new version and if the bug is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants