Skip to content

Commit 0a25a97

Browse files
authored
Support multiline pipeline variable
1 parent 0a1b994 commit 0a25a97

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/actions/azdo-build/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ inputs:
4343
type: string
4444

4545
pipeline-variable:
46-
description: Pipeline variable
46+
description: Pipeline variable (multiline)
4747
required: true
4848
type: string
4949

@@ -118,7 +118,7 @@ runs:
118118
--org ${{ inputs.azdo-org }} \
119119
--output json \
120120
--project ${{ inputs.azdo-project }} \
121-
--variable ${{ inputs.pipeline-variable }}
121+
$(echo "${{ inputs.pipeline-variable }}" | while IFS= read -r line; do [ -n "$line" ] && printf '--variable %q ' "$line"; done)
122122
)
123123
124124
RUN_ID=$(echo "$OUTPUT" | jq -r '.id')

.github/workflows/create-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ jobs:
165165
azure-tenant-id: ${{ vars.AZURE_TENANT_ID }}
166166
download-artifact-name: drop_build_main
167167
# pipeline-variable: ProjectBranch=${{ steps.get-branch-name.outputs.branch-name }}
168-
pipeline-variable: ProjectBranch=main
168+
pipeline-variable: |
169+
ProjectBranch=${{ steps.get-branch-name.outputs.branch-name }}
170+
ProjectRepository=${{ github.repository }}
169171
170172
- name: Download AzDO build artifact
171173
uses: actions/download-artifact@v8

0 commit comments

Comments
 (0)