Skip to content

Commit

Permalink
try to hit dockstore
Browse files Browse the repository at this point in the history
  • Loading branch information
nikellepetrillo committed Dec 12, 2024
1 parent 3b81958 commit a442e2e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test_illumina_genotyping_array.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
run: |
python scripts/dockstore_api/fetch_dockstore_id.py $DOCKSTORE_TOKEN github.com%2Fbroadinstitute%2Fwarp%2FIlluminaGenotypingArray BIOWORKFLOW np_jw_test_illumina_genotyping_arrays
env:
##TODO NEED TO ADD DOCKSTORE_TOKEN FOR SERVICE ACCOUNT##
DOCKSTORE_TOKEN: ${{ secrets.DOCKSTORE_TOKEN }}

- name: Set Commit Hash
Expand Down
15 changes: 13 additions & 2 deletions scripts/dockstore_api/fetch_dockstore_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,19 @@ def fetch_workflow_id(token, repository, subclass, version_name):

response = requests.get(url, params=params, headers=headers)
response.raise_for_status()
workflow_data = response.json()
print(workflow_data.get("id"))
data = response.json()

# Extract workflow and version IDs
workflow_id = data.get("id")
version_id = next(
(version["id"] for version in data.get("workflowVersions", [])
if version["name"] == {version_name}),
None
)

print(f"Workflow ID: {workflow_id}")
print(f"Version ID: {version_id}")


if __name__ == "__main__":
if len(sys.argv) != 5:
Expand Down

0 comments on commit a442e2e

Please sign in to comment.