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
Workflow file for this run
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
| --- | |
| 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" |