weblate/.github/workflows/yarn-update.yml
Michal Čihař fb15d78b3c chore(ci): swtich uv/yarn upgrade jobs to arm
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.
2026-05-07 12:55:42 +02:00

73 lines
2.1 KiB
YAML
Vendored

# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: CC0-1.0
name: yarn update
on:
push:
branches:
- renovate/**
- dependabot/**
- main
- stable
paths:
- .github/workflows/yarn-update.yml
- scripts/yarn-update
- scripts/yarn/*
- client/*
schedule:
- cron: 30 5 * * 0
workflow_dispatch:
pull_request:
paths:
- .github/workflows/yarn-update.yml
- scripts/yarn-update
- scripts/yarn/*
- client/*
permissions:
contents: read
jobs:
yarn-update:
permissions:
contents: write
if: startsWith(github.repository, 'WeblateOrg/')
runs-on: ubuntu-24.04-arm
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
- working-directory: ./client
run: |
yarn install --check-files
yarn build
- name: Lockfile maintenance
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
working-directory: ./client
run: |
yarn upgrade
yarn install
yarn build
- name: Commit or create pull request (pre-commit-ci-lite)
uses: ./.github/actions/auto-commit
with:
message: 'chore(js): update vendored libraries'
pr-branch: create-pull-request/yarn-update
pr-labels: |
dependencies
github-token: ${{ secrets.WEBLATE_CI_TOKEN }} # zizmor: ignore[secrets-outside-env]