Skip to content
This repository was archived by the owner on Jan 1, 2026. It is now read-only.

Update workflows: change permissions to write and enhance step names … #1

Update workflows: change permissions to write and enhance step names …

Update workflows: change permissions to write and enhance step names … #1

---
name: Detect Changed Versions
permissions:
contents: read
statuses: read
on:
workflow_call:
outputs:
versions:
description: "Changed version folders"
value: ${{ jobs.detect.outputs.versions }}
jobs:
detect-changed-versions:
name: Detect Changed Versions
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.detect.outputs.versions }}
steps:
- name: Checkout code
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect changed version folders
id: list-folders
run: |
git fetch origin main
BASE_SHA=$(git merge-base HEAD origin/main)
CHANGED=$(git diff --name-only "$BASE_SHA"...HEAD | grep '^routes/v[0-9]\+/.*\.py$' | grep -v 'test' || true)
VERSIONS=$(echo "$CHANGED" | sed -n 's|^routes/\(v[0-9]\+\)/.*|\1|p' | sort -u | tr '\n' ' ')
echo "versions=$VERSIONS" >> "$GITHUB_OUTPUT"