Skip to content

Commit d1ea82f

Browse files
committed
fix: Remove redundant checkout
1 parent 8bee05d commit d1ea82f

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

action.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,7 @@ outputs:
2323

2424
runs:
2525
using: "composite"
26-
steps:
27-
- name: Checkout
28-
uses: actions/checkout@v3
29-
with:
30-
fetch-depth: 0
31-
path: ./setup-jython
32-
26+
steps:
3327
- run: |
3428
echo "Action running on ${{ runner.os }} ${{ runner.arch }} (name: '${{ runner.name }}')"
3529
shell: bash
@@ -42,7 +36,7 @@ runs:
4236
import sys, os
4337
import json
4438
45-
with open("./bin/resources.json", "r") as f:
39+
with open("${{github.action_path}}/bin/resources.json", "r") as f:
4640
json_content = json.load(f)
4741
4842
matching_versions = list(filter(lambda el: el["version"] == "${{ inputs.jython-version }}".strip(), json_content))
@@ -71,10 +65,10 @@ runs:
7165
file_extension = os.path.splitext(matching_versions[0]["resource_urls"]["official"])[1]
7266
file_extension = file_extension[1:] if file_extension.startswith(".") else file_extension
7367
lines = [
74-
"details='" + json.dumps(matching_versions[0]) + "'\n",
75-
"url=" + matching_versions[0]['resource_urls']['official'] + "\n",
76-
"version=" + matching_versions[0]['version'] + "\n",
77-
"modified_on=" + matching_versions[0]['modified_on'] + "\n",
68+
"details='{}'".format(json.dumps(matching_versions[0])),
69+
"url=" + matching_versions[0]['resource_urls']['official'],
70+
"version=" + matching_versions[0]['version'],
71+
"modified_on=" + matching_versions[0]['modified_on'],
7872
"file_type=" + file_extension,
7973
"file_name=jython_installer." + (file_extension if file_extension else ".jar")
8074
]

0 commit comments

Comments
 (0)