Skip to content

Commit

Permalink
rename parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
freddydk committed Jan 25, 2025
1 parent 8f431aa commit 3bd5805
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[Parameter(HelpMessage = "The maximum depth to build the dependency tree", Mandatory = $false)]
[int] $maxBuildDepth = 0,
[Parameter(HelpMessage = "Specifies whether to publish artifacts for skipped projects", Mandatory = $false)]
[bool] $publishSkippedProjectArtifacts,
[bool] $includeSkippedProjects,
[Parameter(HelpMessage = "The GitHub token to use to fetch the modified files", Mandatory = $true)]
[string] $token
)
Expand All @@ -23,14 +23,14 @@ if ($ghEvent.PSObject.Properties.name -eq 'pull_request') {
# Pull request
$buildAllProjects = $settings.alwaysBuildAllProjects
$branch = $env:GITHUB_BASE_REF
$publishSkippedProjectArtifacts = $false
$includeSkippedProjects = $false
Write-Host "Pull request on $branch"
}
elseif ($ghEvent.PSObject.Properties.name -eq 'workflow_dispatch') {
# Manual workflow dispatch
$buildAllProjects = $true
$branch = $env:GITHUB_REF_NAME
$publishSkippedProjectArtifacts = $false
$includeSkippedProjects = $false
Write-Host "Workflow dispatch on $branch"
}
else {
Expand Down Expand Up @@ -77,8 +77,8 @@ Write-Host "::endgroup::"

#region Action: Output
$skippedProjectsJson = ConvertTo-Json (@($allProjects | Where-Object { $_ -notin $projectsToBuild })) -Depth 99 -Compress
if ($publishSkippedProjectArtifacts) {
# If we are to publish artifacts for skipped projects, we include the full project list and in the build step, just avoid building the skipped projects
if ($includeSkippedProjects) {
# If we are to publish artifacts for skipped projects later, we include the full project list and in the build step, just avoid building the skipped projects
$allProjects, $projectsToBuild, $projectDependencies, $buildOrder = Get-ProjectsToBuild -baseFolder $baseFolder -buildAllProjects $true -modifiedFiles $modifiedFiles -maxBuildDepth $maxBuildDepth
}
$projectsJson = ConvertTo-Json $projectsToBuild -Depth 99 -Compress
Expand Down
4 changes: 2 additions & 2 deletions Actions/DetermineProjectsToBuild/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ none
| :-- | :-: | :-- | :-- |
| shell | | The shell (powershell or pwsh) in which the PowerShell script in this action should run | powershell |
| maxBuildDepth | | Specifies the maximum build depth suppored by the workflow running the action | 0 |
| publishSkippedProjectArtifacts | Specifies whether to publish artifacts for skipped projects | false |
| includeSkippedProjects | Specifies whether to include skipped projects | false |

## OUTPUT

Expand All @@ -29,7 +29,7 @@ none
| Name | Description |
| :-- | :-- |
| ProjectsJson | An array of AL-Go projects in compressed JSON format |
| SkippedProjectsJson | An array of Skipped AL-Go projects in compressed JSON format|
| SkippedProjectsJson | An array of skipped AL-Go projects in compressed JSON format |
| ProjectDependenciesJson | An object that holds the project dependencies in compressed JSON format |
| BuildOrderJson | An array of objects that determine that build order, including build dimensions |
| BuildAllProjects | A flag that indicates whether to build all projects or only the modified ones |
Expand Down
8 changes: 4 additions & 4 deletions Actions/DetermineProjectsToBuild/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ inputs:
description: Specifies the maximum build depth suppored by the workflow running the action
required: false
default: '0'
publishSkippedProjectArtifacts:
description: Specifies whether to publish artifacts for skipped projects
includeSkippedProjects:
description: Specifies whether to include skipped projects
required: false
default: 'false'
outputs:
Expand Down Expand Up @@ -44,10 +44,10 @@ runs:
id: determineProjectsToBuild
env:
_maxBuildDepth: ${{ inputs.maxBuildDepth }}
_publishSkippedProjectArtifacts: ${{ inputs.publishSkippedProjectArtifacts }}
_includeSkippedProjects: ${{ inputs.includeSkippedProjects }}
run: |
${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "DetermineProjectsToBuild" -Action {
${{ github.action_path }}/DetermineProjectsToBuild.Action.ps1 -baseFolder ${{ github.workspace }} -token ${{ github.token }} -maxBuildDepth $env:_maxBuildDepth -publishSkippedProjectArtifacts ($env:_publishSkippedProjectArtifacts -eq 'true')
${{ github.action_path }}/DetermineProjectsToBuild.Action.ps1 -baseFolder ${{ github.workspace }} -token ${{ github.token }} -maxBuildDepth $env:_maxBuildDepth -includeSkippedProjects ($env:_includeSkippedProjects -eq 'true')
}
branding:
icon: terminal
Expand Down
2 changes: 1 addition & 1 deletion Templates/AppSource App/.github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
with:
shell: powershell
maxBuildDepth: ${{ env.workflowDepth }}
publishSkippedProjectArtifacts: 'true'
includeSkippedProjects: 'true'

- name: Determine PowerPlatform Solution Folder
id: DeterminePowerPlatformSolutionFolder
Expand Down
2 changes: 1 addition & 1 deletion Templates/Per Tenant Extension/.github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
with:
shell: powershell
maxBuildDepth: ${{ env.workflowDepth }}
publishSkippedProjectArtifacts: 'true'
includeSkippedProjects: 'true'

- name: Determine PowerPlatform Solution Folder
id: DeterminePowerPlatformSolutionFolder
Expand Down

0 comments on commit 3bd5805

Please sign in to comment.