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

Create a reusable workflow to commit build assets to dependabot PRs #8

Closed
SteelWagstaff opened this issue Mar 5, 2024 · 0 comments
Closed

Comments

@SteelWagstaff
Copy link
Member

SteelWagstaff commented Mar 5, 2024

Dependabot PRs sometimes update JS dependencies declared in a repo's package.json. In order for the update to have full impact, we often need to run npm run build in the repo after updating the package.json or package.lock file to rebuild related assets. We should create a GitHub action that automatically checks out the dependabot PR branch, runs npm ci && npm run build and commits any update build assets to the dependabot PR.

In pressbooks/pressbooks, we have a post-commit action for dependabot PRs that autobuilds assets and commits them to the PR: https://github.com/pressbooks/pressbooks/blob/dev/.github/workflows/autobuild-dependabot-assets.yml. This PR doesn't play well with our required 'lint & build assets' step, however. See pressbooks/pressbooks#3206 or screenshot below
Screenshot from 2023-02-28 11-42-32

It only works now because our required actions are broken and no longer running on our PRs.

Once we have a reusable workflow that does this, we should add it to all the repos where it would be useful.

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