Skip to content

Commit 6bd3c82

Browse files
committed
dbeaver/dbeaver-devops#2023 Add mvn-property input and mvn-flag output
to action.yml
1 parent 84d21cc commit 6bd3c82

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

prepare-custom-p2/action.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ inputs:
55
repo:
66
description: "The repository to check out the custom p2 from"
77
required: true
8+
mvn-property:
9+
description: "The Maven property to set the custom p2 repository URL to"
10+
required: true
811
token:
912
default: ${{ github.token }}
1013
description: "A GitHub token to use for cloning repositories"
1114

1215
outputs:
13-
p2-found:
14-
description: "Whether a custom p2 repository for the current branch was found"
15-
value: ${{ steps.find-p2.outputs.p2-found }}
16+
mvn-flag:
17+
description: "The Maven flag to use to set the custom p2 repository URL"
18+
value: ${{ steps.set-mvn-glag.outputs.mvn-flag || '' }}
1619

1720
runs:
1821
using: "composite"
@@ -49,3 +52,11 @@ runs:
4952
if: ${{ steps.find-p2.outputs.p2-found == 'true' }}
5053
with:
5154
repo-root-dir: ./${{ inputs.repo }}
55+
56+
- name: Set mvn-flag output
57+
if: ${{ steps.find-p2.outputs.p2-found == 'true' }}
58+
id: set-mvn-flag
59+
shell: bash
60+
run: |
61+
p2_uri="file://$(realpath ./${{ inputs.repo }}/p2/repository/target/repository)"
62+
echo "mvn-flag=-D${{ inputs.mvn-property }}=$p2_uri" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)