chore: add useful scripts for RC

This commit is contained in:
Roman Acevedo
2025-07-09 10:19:05 +02:00
committed by GitHub
parent d1b025253a
commit 7ec1439bb7
4 changed files with 80 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
set -e
OWNER='kestra-io'
REPO=$1
if [[ -z "$REPO" ]]; then
echo -e "Missing required argument repo\n";
fi
echo "get caches for /repo/$OWNER/$REPO/action/caches"
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/$OWNER/$REPO/actions/caches > caches.json
for id in $(jq -r '.actions_caches[].id' caches.json); do
echo "delete cache with ID: $id"
gh api --method DELETE "/repos/$OWNER/$REPO/actions/caches/$id"
done

View File

@@ -0,0 +1,28 @@
#!/bin/bash
# Usage: ./trigger-workflow.sh <repo> <branch>
set -e
if [ -z "$1" ]; then
echo "Usage: $0 <repo> <branch-name>"
exit 1
fi
if [ -z "$2" ]; then
echo "Usage: $0 <repo> <branch-name>"
exit 1
fi
REPO="$1"
BRANCH="$2"
OWNER="kestra-io"
WORKFLOW="main.yml"
echo "Triggering workflow '$WORKFLOW' on branch '$BRANCH'..."
gh workflow run "$WORKFLOW" \
--repo "$OWNER/$REPO" \
--ref "$BRANCH"
echo "Triggered. Run 'gh run list --repo $OWNER/$REPO --branch $BRANCH' to check status."

View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Usage: $0 <repo> <branch-name>"
exit 1
fi
if [ -z "$2" ]; then
echo "Usage: $0 <repo> <branch-name>"
exit 1
fi
REPO="$1"
BRANCH="$2"
echo "delete cache and restart build for '$REPO' on branch '$BRANCH'..."
sh ./empty-cache.sh $REPO
sh ./launch-release-workflow.sh $REPO $BRANCH
echo "delete and restart done for '$REPO' on branch '$BRANCH'..."

View File

@@ -0,0 +1,10 @@
set -e
OWNER='kestra-io'
gh repo list "$OWNER" --limit 1000 --json name -q '.[] | select(.name | startswith("plugin-")) | .name' |
while read -r repo; do
echo "Calling script for $repo"
sh launch-release-workflow.sh $repo master &
done