Module Version Bump #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Module Version Bump | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| # checkov:skip=CKV_GHA_7:Manual inputs are desired. | |
| newVersionNumber: | |
| description: "New Version number (e.g., 1.2.4)" | |
| required: true | |
| type: string | |
| permissions: read-all | |
| jobs: | |
| module-version-bump: | |
| runs-on: windows-latest | |
| env: | |
| NEW_VERSION_NUMBER: ${{ inputs.newVersionNumber }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Check if input is valid | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Set the repository owner and name as environment variables to access from the PowerShell module | |
| $env:REPO = "${{ github.repository }}" | |
| Import-Module ./utils/workflow/Set-ScubaGearModuleVersion.psm1 -Function Test-ScubaGearVersionWorkflowInput | |
| Test-ScubaGearVersionWorkflowInput | |
| - name: Bump ScubaGear Version Number | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| Import-Module ./utils/workflow/Set-ScubaGearModuleVersion.psm1 | |
| Set-ScubaGearModuleVersion |