Skip to content

Commit 53b886b

Browse files
committed
Update ant and add internal CI for the action
Signed-off-by: Taylor Smock <smocktaylor@gmail.com>
1 parent 055bb38 commit 53b886b

5 files changed

Lines changed: 62 additions & 12 deletions

File tree

.github/workflows/ant.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ on:
3030
required: false
3131
ant-version:
3232
type: string
33-
default: 'apache-ant-1.10.14'
33+
default: 'apache-ant-1.10.15'
3434
perform-revision-tagging:
3535
type: boolean
3636
default: false
@@ -41,6 +41,21 @@ on:
4141
default: 0
4242
required: false
4343
description: "Set to an offset for automatic tagging. For example, if the last plugin version was 100, but there are only 20 commits, then this should be 80"
44+
repository:
45+
type: string
46+
default: ${{ github.repository }}
47+
required: false
48+
description: "A variable used for developing the GitHub Action. See actions/checkout@v4."
49+
ref:
50+
type: string
51+
default: ''
52+
required: false
53+
description: "A variable used for developing the GitHub Action. See actions/checkout@v4."
54+
action_version:
55+
type: string
56+
default: 'v3'
57+
required: false
58+
description: "A variable used for developing the GitHub Action."
4459
outputs:
4560
tag:
4661
description: "The release tag"
@@ -66,7 +81,7 @@ jobs:
6681
distribution: ${{ inputs.java-distribution }}
6782
java-version: ${{ inputs.java-version }}
6883
- id: josm-build
69-
uses: JOSM/JOSMPluginAction/actions/josm_build@v3
84+
uses: JOSM/JOSMPluginAction/actions/josm_build@${{ inputs.action_version }}
7085
with:
7186
josm-revision: ${{ inputs.josm-revision }}
7287

@@ -79,6 +94,8 @@ jobs:
7994
if: ${{ inputs.perform-revision-tagging }}
8095
with:
8196
fetch-depth: 0
97+
repository: '${{ inputs.repository }}'
98+
ref: '${{ inputs.ref }}'
8299
- name: Set revision env variable
83100
if: ${{ inputs.perform-revision-tagging }}
84101
id: create_revision
@@ -103,10 +120,10 @@ jobs:
103120
if [ -z "$(which svn)" ] && [ "${{ runner.os }}" == "Linux" ]; then
104121
sudo apt-get update && sudo apt-get install -y subversion
105122
fi
106-
- uses: JOSM/JOSMPluginAction/actions/setup-ant@v3
123+
- uses: JOSM/JOSMPluginAction/actions/setup-ant@${{ inputs.action_version }}
107124
with:
108125
ant-version: ${{ inputs.ant-version }}
109-
- uses: JOSM/JOSMPluginAction/actions/plugin_clone@v3
126+
- uses: JOSM/JOSMPluginAction/actions/plugin_clone@v${{ inputs.action_version }}
110127
with:
111128
java-distribution: ${{ inputs.java-distribution }}
112129
java-version: ${{ inputs.java-version }}
@@ -156,10 +173,10 @@ jobs:
156173
if [ -z "$(which svn)" ] && [ "${{ runner.os }}" == "Linux" ]; then
157174
sudo apt-get update && sudo apt-get install -y subversion
158175
fi
159-
- uses: JOSM/JOSMPluginAction/actions/setup-ant@v3
176+
- uses: JOSM/JOSMPluginAction/actions/setup-ant@${{ inputs.action_version }}
160177
with:
161178
ant-version: ${{ inputs.ant-version }}
162-
- uses: JOSM/JOSMPluginAction/actions/plugin_clone@v3
179+
- uses: JOSM/JOSMPluginAction/actions/plugin_clone@${{ inputs.action_version }}
163180
with:
164181
java-distribution: ${{ inputs.java-distribution }}
165182
java-version: ${{ inputs.java-version }}

.github/workflows/internal_ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- $default-branch
6+
- $protected-branches
7+
pull_request:
8+
branches:
9+
- master
10+
- $default-branch
11+
workflow_dispatch:
12+
13+
permissions:
14+
id-token: write
15+
attestations: write
16+
contents: write
17+
packages: write
18+
19+
jobs:
20+
call-workflow-latest:
21+
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@${{ github_sha }}
22+
with:
23+
josm-revision: ""
24+
java-version: 17
25+
call-workflow-min:
26+
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@${{ github.sha }}
27+
with:
28+
josm-revision: "r19387"
29+
java-version: 17
30+
perform-revision-tagging: false
31+
repository: 'JOSM/Mapillary'
32+
ref: 'master'
33+
action_version: ${{ github.sha }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Use a specific java distribution for running the action. Defaults to `temurin`.
7777
## Environment variables
7878
### `ANT_HOME`
7979
This sets both the `ant` home, but do note that it is used to download the
80-
specified `ant` version. Defaults to `apache-ant-1.10.14`. You should generally
80+
specified `ant` version. Defaults to `apache-ant-1.10.15`. You should generally
8181
avoid changing this environment variable. Open a pull request first.
8282

8383
# License

actions/setup-ant/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "Ant setup"
22
description: "Setup ant"
33
inputs:
44
ant-version:
5-
default: 1.10.14
5+
default: 1.10.15
66
description: The version of ant to download and install
77
outputs:
88
ant-home:

actions/setup-ant/src/ant-setup.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ describe("test downloadTool", () => {
3434
}
3535
});
3636

37-
test("1.10.14", async () => {
38-
await downloadAntTool("1.10.14");
37+
test("1.10.15", async () => {
38+
await downloadAntTool("1.10.15");
3939
try {
4040
expect(coreAddPath).toBeCalledTimes(1);
4141
expect(coreAddPath).toBeCalledWith(
42-
join(tempDir, "cache", "apache-ant", "1.10.14", process.arch, "bin"),
42+
join(tempDir, "cache", "apache-ant", "1.10.15", process.arch, "bin"),
4343
);
4444
} finally {
45-
await rmRF("1.10.14");
45+
await rmRF("1.10.15");
4646
}
4747
}, 15_000);
4848
});

0 commit comments

Comments
 (0)