Skip to content

chore(dev): update vitest monorepo to v4 #29397

chore(dev): update vitest monorepo to v4

chore(dev): update vitest monorepo to v4 #29397

Workflow file for this run

---
# Renovate this repository if Renovate-specific tasks are checked or if dispatched.
name: Renovate
on:
issues:
types: [edited]
pull_request:
types: [edited]
push:
branches-ignore: [main]
schedule:
- cron: '0 * * * *' # Run every hour
workflow_call:
inputs:
log-level:
description: Log level
type: string
default: debug
path-filters:
description: List of paths to filter for checking for changes
type: string
print-config:
description: Log the fully-resolved Renovate config for each repository, plus fully-resolved presets.
type: boolean
default: false
renovate-app-slug:
description: GitHub App slug
type: string
secrets:
APPLICATION_ID:
description: GitHub App ID
required: true
APPLICATION_PRIVATE_KEY:
description: GitHub App private key
required: true
workflow_dispatch:
inputs:
log-level:
description: Log level
type: string
default: debug
path-filters:
description: List of paths to filter for checking for changes
type: string
print-config:
description: Log the fully-resolved Renovate config for each repository, plus fully-resolved presets.
type: boolean
default: false
workflow_run:
branches: [main]
types: [completed]
workflows: [Main]
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.run_number || github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
renovate:
name: Renovate
if: >-
(github.event_name != 'issues' && github.event_name != 'pull_request') ||
(github.event_name != 'issues' && contains(github.event.*.labels.*.name, 'renovate')) ||
(
contains(join(github.event.*.body, ''), '- [x] <!-- approve-all-pending-prs -->') ||
contains(join(github.event.*.body, ''), '- [x] <!-- approve-branch=') ||
contains(join(github.event.*.body, ''), '- [x] <!-- approvePr-branch=') ||
contains(join(github.event.*.body, ''), '- [x] <!-- create-all-rate-limited-prs -->') ||
contains(join(github.event.*.body, ''), '- [x] <!-- create-config-migration-pr -->') ||
contains(join(github.event.*.body, ''), '- [x] <!-- manual job -->') ||
contains(join(github.event.*.body, ''), '- [x] <!-- other-branch=') ||
contains(join(github.event.*.body, ''), '- [x] <!-- rebase-all-open-prs -->') ||
contains(join(github.event.*.body, ''), '- [x] <!-- rebase-branch=') ||
contains(join(github.event.*.body, ''), '- [x] <!-- rebase-check -->') ||
contains(join(github.event.*.body, ''), '- [x] <!-- recreate-branch=') ||
contains(join(github.event.*.body, ''), '- [x] <!-- retry-branch=') ||
contains(join(github.event.*.body, ''), '- [x] <!-- unlimit-branch=') ||
contains(join(github.event.*.body, ''), '- [x] <!-- unschedule-branch=')
)
env:
WORKFLOW_LOG_LEVEL: debug
default_path_filters: "['.github/workflows/renovate.yaml', '.github/renovate.json5']"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- id: prepare
name: Prepare Repository List
env:
AUTODISCOVER: ${{ github.event.repository.name == '.github' && !contains('["issues", "pull_request"]', github.event_name) && github.ref == 'refs/heads/main' }}
run: |
# Check if yq is already installed
if ! command -v yq &> /dev/null; then
echo "Installing yq..."
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq
fi
# Extract repository list and create outputs
ORG="${{ github.repository_owner }}"
REPOS="[]"
REPO_LIST="[]"
if [ "${{ env.AUTODISCOVER }}" == "true" ] && [ -f "metadata/renovate.yaml" ]; then
REPO_LIST=$(yq -I0 -o=json '.repositories.with-renovate' metadata/renovate.yaml 2>/dev/null || echo "")
if [ -n "$REPO_LIST" ]; then
# Create pattern for autodiscover filter
PATTERN=$(echo "$REPO_LIST" | \
jq -c 'map(select(. != ".github")) | join("|")' | \
sed s/\"//g)
if [ -n "$PATTERN" ]; then
REPOS="[\"!/$ORG\\/($PATTERN)/\"]"
fi
fi
fi
echo "repos=$REPOS" >> $GITHUB_OUTPUT
echo "repo_list=$REPO_LIST" >> $GITHUB_OUTPUT
echo "autodiscover=$AUTODISCOVER" >> $GITHUB_OUTPUT
- id: get-workflow-access-token
if: fromJSON(steps.prepare.outputs.repo_list)[0] != null
name: Get Workflow Access Token
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
with:
app-id: ${{ secrets.APPLICATION_ID }}
private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- if: fromJSON(steps.prepare.outputs.repo_list)[0] != null
name: Dispatch Repository Updates
env:
GH_TOKEN: ${{ steps.get-workflow-access-token.outputs.token }}
ORG: ${{ github.repository_owner }}
REPO_LIST: ${{ steps.prepare.outputs.repo_list }}
run: |
# Trigger workflow_dispatch for each repository
echo "$REPO_LIST" | jq -r '.[]' | while read -r repo; do
if [ "$repo" != ".github" ]; then
echo "Triggering workflow_dispatch for $ORG/$repo"
gh workflow run renovate.yaml --repo $ORG/$repo
fi
done
- id: filter
if: github.event_name == 'push'
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
with:
filters: |
changes: ${{ inputs.path-filters != '' && inputs.path-filters || env.default_path_filters }}
- name: Renovate
env:
dry_run: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }}
if: >-
${{ !contains('["push", "workflow_run"]', github.event_name) || github.event.workflow_run.conclusion == 'success' || steps.filter.outputs.changes == 'true' }}
uses: bfra-me/renovate-action@bae02d2171ee608ab859db8943556fc56015a7e4 # 7.123.0
with:
autodiscover: ${{ steps.prepare.outputs.autodiscover }}
autodiscover-filter: ${{ steps.prepare.outputs.autodiscover == 'true' && steps.prepare.outputs.repos || '[]' }}
branch: ${{ (env.dry_run == 'true') && (github.head_ref || github.ref_name) || '' }}
cache: true
dry-run: ${{ env.dry_run }}
log-level: ${{ inputs.log-level || steps.prepare.outputs.autodiscover == 'true' && 'debug' || env.WORKFLOW_LOG_LEVEL }}
print-config: ${{ inputs.print-config }}
renovate-app-id: ${{ secrets.APPLICATION_ID }}
renovate-app-private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
timeout-minutes: 30