mirror of
https://github.com/YunoHost-Apps/pleroma_ynh.git
synced 2024-09-03 20:15:59 +02:00
Optimize API call to get pipeline id
Co-authored-by: Sean King <31253278+seanking2919@users.noreply.github.com>
This commit is contained in:
parent
0db2bdf409
commit
d218041c9d
1 changed files with 1 additions and 1 deletions
2
.github/workflows/updater.sh
vendored
2
.github/workflows/updater.sh
vendored
|
@ -22,7 +22,7 @@ assets=$(echo $latest_release_json | jq -r '[ .assets.sources[].url ] | join(" "
|
|||
release=$(echo $latest_release_json | jq -r '[ ._links.self ] | join(" ")' | tr -d "'")
|
||||
description=$(echo $latest_release_json | jq -r '[ .description ] | join(" ")' | tr -d "'")
|
||||
commit_id=$(echo $latest_release_json | jq -r '[ .commit.id ] | join(" ")' | tr -d "'")
|
||||
pipeline_id=$(curl --silent "https://git.pleroma.social/api/v4/projects/2/pipelines" | jq -r '[ .[] | select((.ref=="stable") and (.sha=="'$commit_id'")).id|tostring ] | join(" ") ' | tr -d "'")
|
||||
pipeline_id=$(curl --silent "https://git.pleroma.social/api/v4/projects/2/pipelines?sha=$commit_id&ref=stable" | jq -r '[ .[] | .id|tostring ] | join(" ") ' | tr -d "'")
|
||||
|
||||
# Later down the script, we assume the version has only digits and dots
|
||||
# Sometimes the release name starts with a "v", so let's filter it out.
|
||||
|
|
Loading…
Add table
Reference in a new issue