-
Notifications
You must be signed in to change notification settings - Fork 0
🩹[Patch]: Remove deprecated release.yml and rename Auto-Release to Release-GHRepository #60
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
base: main
Are you sure you want to change the base?
Changes from all commits
a2500df
f5a4cd4
151cf81
45b52e8
1c03ca3
3b4309d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,7 +22,7 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| required: false | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default: 'true' | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IncrementalPrerelease: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: Control wether to automatically increment the prerelease number. If disabled, the action will ensure only one prerelease exists for a given branch. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: Control whether to automatically increment the prerelease number. If disabled, the action will ensure only one prerelease exists for a given branch. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| required: false | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default: 'true' | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DatePrereleaseFormat: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -102,7 +102,7 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PSMODULE_PUBLISH_PSMODULE_INPUT_PatchLabels: ${{ inputs.PatchLabels }} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PSMODULE_PUBLISH_PSMODULE_INPUT_VersionPrefix: ${{ inputs.VersionPrefix }} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PSMODULE_PUBLISH_PSMODULE_INPUT_WhatIf: ${{ inputs.WhatIf }} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: ${{ github.action_path }}/scripts/init.ps1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: ${{ github.action_path }}/src/init.ps1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Download module artifact | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: env.PUBLISH_CONTEXT_ShouldPublish == 'true' || inputs.WhatIf == 'true' | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -123,12 +123,12 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PSMODULE_PUBLISH_PSMODULE_INPUT_UsePRBodyAsReleaseNotes: ${{ inputs.UsePRBodyAsReleaseNotes }} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PSMODULE_PUBLISH_PSMODULE_INPUT_UsePRTitleAsReleaseName: ${{ inputs.UsePRTitleAsReleaseName }} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PSMODULE_PUBLISH_PSMODULE_INPUT_UsePRTitleAsNotesHeading: ${{ inputs.UsePRTitleAsNotesHeading }} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: ${{ github.action_path }}/scripts/publish.ps1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: ${{ github.action_path }}/src/publish.ps1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check warningCode scanning / CodeQL Code injection Medium
Potential code injection in
${ github.action_path } Error loading related location Loading Copilot AutofixAI about 3 hours ago Copilot could not generate an autofix suggestion Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
Comment on lines
123
to
+126
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Cleanup Prereleases | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: env.PUBLISH_CONTEXT_ShouldCleanup == 'true' || inputs.WhatIf == 'true' | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shell: pwsh | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| working-directory: ${{ inputs.WorkingDirectory }} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PSMODULE_PUBLISH_PSMODULE_INPUT_WhatIf: ${{ inputs.WhatIf }} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: ${{ github.action_path }}/scripts/cleanup.ps1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: ${{ github.action_path }}/src/cleanup.ps1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check warningCode scanning / CodeQL Code injection Medium
Potential code injection in
${ github.action_path } Error loading related location Loading
Copilot AutofixAI about 4 hours ago In general, to fix this class of problem in GitHub Actions, avoid interpolating expressions like For this specific case, we should stop embedding Concretely:
No new methods or external libraries are needed; only YAML and PowerShell changes within
Suggested changeset
1
action.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check warning
Code scanning / CodeQL
Code injection Medium
Copilot Autofix
AI about 3 hours ago
In general, to fix this kind of issue in GitHub Actions, do not interpolate expressions like
${{ ... }}directly into therun:script body. Instead, assign the value to an environment variable using theenv:block, then reference it using the shell’s native syntax (e.g.$VARin bash,$env:VARin PowerShell). This removes the expression evaluation from the command line construction and prevents an attacker from smuggling shell metacharacters through GitHub’s expression substitution.For this specific case, we will stop using
${{ github.action_path }}/src/*.ps1directly inrun:and instead exposegithub.action_paththrough an environment variable (for example,ACTION_PATH) and use that variable inside the PowerShell command. Since this is a composite action usingshell: pwsh, we will call PowerShell with-Filepointing at$env:ACTION_PATH/src/init.ps1(and similarly forpublish.ps1andcleanup.ps1). Concretely:ACTION_PATH: ${{ github.action_path }}toenv:and changerun:to something likepwsh -File "$env:ACTION_PATH/src/init.ps1".ACTION_PATHand change therun:line to use it.These are all in
action.yml, within theruns.stepssection around lines 88–135 in your snippet. No new external dependencies or imports are required; we only adjust the workflow YAML to follow the safe environment-variable pattern.