mirror of
https://github.com/WeblateOrg/weblate.git
synced 2026-07-27 22:46:38 +08:00
These seem to have shorter queue, so spread the load there for faster execution of lock file updates. Also consolidate the CI with pre-commit shared setup.
67 lines
1.9 KiB
YAML
Vendored
67 lines
1.9 KiB
YAML
Vendored
# Copyright © Michal Čihař <michal@weblate.org>
|
|
#
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
name: uv lock update
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- renovate/**
|
|
- dependabot/**
|
|
- main
|
|
- stable
|
|
paths:
|
|
- pyproject.toml
|
|
- .github/workflows/uv-upgrade.yml
|
|
schedule:
|
|
- cron: 30 10 * * 0
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- pyproject.toml
|
|
- .github/workflows/uv-upgrade.yml
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
uv-update:
|
|
if: startsWith(github.repository, 'WeblateOrg/')
|
|
runs-on: ubuntu-24.04-arm
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
if: github.event_name != 'pull_request' && github.repository_owner == 'WeblateOrg'
|
|
with:
|
|
token: ${{ secrets.WEBLATE_CI_TOKEN }} # zizmor: ignore[secrets-outside-env]
|
|
persist-credentials: true
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
if: github.event_name != 'pull_request' && github.repository_owner != 'WeblateOrg'
|
|
with:
|
|
persist-credentials: true
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
if: github.event_name == 'pull_request'
|
|
with:
|
|
persist-credentials: false
|
|
- uses: ./.github/actions/pre-commit-setup
|
|
- name: Install apt dependencies
|
|
run: sudo ./ci/apt-install
|
|
|
|
- name: Lockfile maintenance
|
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
run: uv lock --upgrade
|
|
|
|
- run: uv sync --all-extras
|
|
name: Update lock file
|
|
|
|
- name: Commit or create pull request (pre-commit-ci-lite)
|
|
uses: ./.github/actions/auto-commit
|
|
with:
|
|
message: 'chore(deps): update lockfile'
|
|
pr-branch: create-pull-request/uv-lock-update
|
|
pr-labels: |
|
|
dependencies
|
|
github-token: ${{ secrets.WEBLATE_CI_TOKEN }} # zizmor: ignore[secrets-outside-env]
|