Skip to content

Commit ddb0e95

Browse files
committed
Clone the appropriate repo into the correct directory for CI in the action repo
Signed-off-by: Taylor Smock <smocktaylor@gmail.com>
1 parent 0235eac commit ddb0e95

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/internal_ant.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ jobs:
130130
josm-revision: ${{ needs.josm-build.outputs.josm-revision }}
131131
josm-test-revision: ${{ needs.josm-build.outputs.josm-test-revision }}
132132
plugin-jar-name: ${{ inputs.plugin-jar-name }}
133+
repository: ${{ inputs.repository }}
134+
ref: ${{ inputs.ref }}
135+
plugin-directory: ${{ inputs.plugin-directory }}
133136
fetch-depth: 0
134137
- name: Set version information
135138
id: version

actions/plugin_clone/action.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ inputs:
2525
default: '1'
2626
required: false
2727
description: "The number of commits to fetch. 0 indicates all history for all branches and tags. Default: 1"
28+
repository:
29+
default: ${{ github.repository }}
30+
required: false
31+
description: "A variable used for developing the GitHub Action. See actions/checkout@v4."
32+
ref:
33+
default: ''
34+
required: false
35+
description: "A variable used for developing the GitHub Action. See actions/checkout@v4."
36+
plugin-directory:
37+
default: ${{ github.event.repository.name }}
38+
required: false
39+
description: "A variable used for developing the GitHub Action. We change directory to this prior to running build actions."
2840

2941
outputs:
3042
plugin-directory:
@@ -46,12 +58,14 @@ runs:
4658

4759
- uses: actions/checkout@v4
4860
with:
49-
path: ${{ steps.josm-plugin-clone.outputs.plugin-dir }}/${{ github.event.repository.name }}
61+
path: ${{ steps.josm-plugin-clone.outputs.plugin-dir }}/${{ inputs.plugin-directory }}
5062
fetch-depth: ${{ inputs.fetch-depth }}
63+
repository: '${{ inputs.repository }}'
64+
ref: ${{ inputs.ref }}
5165
- name: Get plugin dependencies
5266
uses: JOSM/JOSMPluginAction/actions/josm_plugin_dependencies@v3
5367
with:
54-
plugin-dir: ${{ steps.josm-plugin-clone.outputs.plugin-dir }}/${{ github.event.repository.name }}
68+
plugin-dir: ${{ steps.josm-plugin-clone.outputs.plugin-dir }}/${{ inputs.plugin-directory }}
5569
josm-revision: ${{ inputs.josm-revision }}
5670
josm-test-revision: ${{ inputs.josm-test-revision }}
5771
plugin-jar-name: ${{ inputs.plugin-jar-name }}

0 commit comments

Comments
 (0)