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

Push a commit to and open a pull request on pyvideo/pyvideo when new data is merged into main #1184

Open
jonafato opened this issue Aug 9, 2024 · 0 comments

Comments

@jonafato
Copy link
Member

jonafato commented Aug 9, 2024

The current process for updating data in the https://github.com/pyvideo/pyvideo repository (which is where the site is built and deployed from) is a manual update of the git submodule. This almost always follows the same automatable process of create a "fastforward-data-dir" branch -> update the data submodule -> open a pull request on pyvideo/pyvideo to preview changes. While this is not a large task, it's consistent enough that it's worth automating via GitHub Actions. A suitable workflow would look like the following steps triggered by a merge to main (skipping commits where the affected filepaths do not modify any of the site data, e.g. documentation-only changes):

  1. Create a "fastforward-data-directory" branch for pyvideo/pyvideo if one does not already exist, or fetch the existing branch if it does
  2. Update the data submodule to point to the new latest commit (i.e. the merge that triggers the workflow)
  3. Push the branch to the pyvideo/pyvideo repository
  4. Open a pull request if one does not already exist

There are several approaches that can be used for this task, including GitHub actions using the GitHub CLI or off the shelf actions like action-pull-request and action-commit-push. One GitHub limitation to note: a custom GitHub token must be used in order for a commit pushed by an action to trigger another action, so the implementation should support pulling that value from a GitHub secret (there are examples of this in the linked push and pull request actions).

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

1 participant