Created
March 5, 2025 18:40
-
-
Save myoun/8d97e5dcdf588884cbdd360b6bf9f3be to your computer and use it in GitHub Desktop.
get latest artifacts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
owner = "carbonium-community" | |
repo = "carbonium-deploy" | |
workflow_name = "build_core" | |
runs_url = f"https://api.github.com/repos/{owner}/{repo}/actions/workflows/{workflow_name}.yml/runs?per_page=1&status=success" | |
runs_res= requests.get(runs_url).json() | |
latest_success = runs_res["workflow_runs"][0] | |
artifacts_url = latest_success["artifacts_url"] | |
artifacts_res = requests.get(artifacts_url) | |
print(artifacts_res.json()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment