-
Notifications
You must be signed in to change notification settings - Fork 336
Issue 1096:workflow to automatically bump PowerShell module dependencies #1680
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
Conversation
| git config --global user.name 'github-actions[bot]' | ||
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
| git add ./PowerShell/ScubaGear/RequiredVersions.ps1 | ||
| git commit -m 'Bump PowerShell dependencies' || echo "No changes to commit" | ||
| git push |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this just push to the current branch?
Recommendation would be to create a separate branch when the workflow is run.
Similar to the current OPA update workflow: https://github.com/cisagov/ScubaGear/blob/main/.github/workflows/run_update_opa.yaml
Example of a PR created by the workflow: buidav#63
One thing critical to this issue as well is we want to run a smoke test of ScubaGear with the new module version to see there are any errors.
Smoke test workflow:
https://github.com/cisagov/ScubaGear/blob/main/.github/workflows/run_smoke_test.yaml
…8075922 Bump PowerShell dependencies
|
#1684 is the latest. |
🗣 Description
Currently we are having to manually check for version updates for our PowerShell dependencies.
This issue is to create a GitHub action to automatically bump our PowerShell dependency versions.
Since there is no dependabot for PowerShell this workflow has to be custom made.
This change implements 2 workflows. One for updating the MaximumVersion of all the modules in the PowerShell/ScubaGear/RequiredVersions.ps1 file and another, which can be removed if unwanted, that updates a dependencies.psd1 file in the root directory. The one in the root directory allows to see if changes were made to versions without diving into the folder structure to view other files.
💭 Motivation and context
Closes 1096 https://github.com//issues/1096🧪 Testing
My tests were successfull, yes anyone can test it. Forked main from CISA and updated files in the fork. Tested the workflows manually and then had them run automatically at midnight. Updates to the dependency files were made successfully in both cases. Ran ScubaGear after the changes were made, no issues seen. N/A✅ Pre-approval checklist
✅ Pre-merge checklist
PR passed smoke test check.
Feature branch has been rebased against changes from parent branch, as needed
Use
Rebase branchbutton below or use this reference to rebase from the command line.Resolved all merge conflicts on branch
Notified merge coordinator that PR is ready for merge via comment mention
Demonstrate changes to the team for questions and comments.
(Note: Only required for issues of size
Mediumor larger)✅ Post-merge checklist