forgejo-ci: if not draft, nuke file from -testing branch
This commit is contained in:
parent
f815fbf7a5
commit
fa8b63c7af
1 changed files with 4 additions and 0 deletions
|
@ -15,7 +15,11 @@ for apk in $apkgs; do
|
||||||
name=$(echo $apk | awk -F '/' '{print $4}')
|
name=$(echo $apk | awk -F '/' '{print $4}')
|
||||||
|
|
||||||
if [ "$(curl -s $GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/pulls/$GITHUB_EVENT_NUMBER | jq .draft)" == "true" ]; then
|
if [ "$(curl -s $GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/pulls/$GITHUB_EVENT_NUMBER | jq .draft)" == "true" ]; then
|
||||||
|
# if draft, send to -testing branch
|
||||||
branch="$branch-testing"
|
branch="$branch-testing"
|
||||||
|
else
|
||||||
|
# if not draft, assume that this was sent to $branch-testing and nuke it
|
||||||
|
curl -s --user $FORGE_REPO_USER:$FORGE_REPO_TOKEN -X DELETE $TARGET_REPO/$BASEBRANCH/$branch-testing/$arch/$name
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Sending $name of arch $arch to $TARGET_REPO/$BASEBRANCH/$branch"
|
echo "Sending $name of arch $arch to $TARGET_REPO/$BASEBRANCH/$branch"
|
||||||
|
|
Loading…
Reference in a new issue