Skip to content

chore: Sync with WeblateOrg/meta #75

chore: Sync with WeblateOrg/meta

chore: Sync with WeblateOrg/meta #75

Workflow file for this run

# Copyright © Michal Čihař <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0
# This file is maintained in https://github.com/WeblateOrg/meta/
name: yarn update
on:
push:
branches:
- renovate/**
- main
paths:
- .github/workflows/yarn-update.yml
- scripts/yarn-update
- scripts/yarn/*
- client/*
schedule:
- cron: 30 5 * * 0
workflow_dispatch:
permissions:
contents: read
jobs:
yarn-update:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.WEBLATE_CI_TOKEN }}
- name: Lockfile maintenance
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
run: |
for dir in scripts/yarn client ; do
pushd "$dir"
yarn upgrade
popd
done
- run: ./scripts/yarn-update
- run: |
if [ -d client ] ; then
cd client
yarn install --check-files
yarn build
cd ..
fi
- name: Update current branch
if: github.ref != 'refs/heads/main'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore(js): update vendored libraries'
- name: Create Pull Request
id: cpr
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v7
with:
branch: create-pull-request/yarn-update
title: 'chore(js): update vendored libraries'
commit-message: 'chore(js): update vendored libraries'
token: ${{ secrets.WEBLATE_CI_TOKEN }}
labels: |
dependencies
- name: Enable Pull Request Automerge
if: github.ref == 'refs/heads/main' && steps.cpr.outputs.pull-request-operation != 'none'
run: gh pr merge --merge --auto "${{ steps.cpr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ secrets.WEBLATE_CI_TOKEN }}