From 2ca04f7baca5e70060e2e23e99afaf3323e514ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 7 Nov 2024 10:47:48 +0100 Subject: [PATCH] chore: Sync with WeblateOrg/meta --- .github/renovate.json | 3 --- .github/workflows/pre-commit.yml | 2 +- .github/workflows/yarn-update.yml | 30 ++++++++++++++++++++++++++++-- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index 2964a8dd36..29b14805d6 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -2,9 +2,6 @@ "labels": [ "dependencies" ], - "lockFileMaintenance": { - "enabled": true - }, "rangeStrategy": "widen", "dependencyDashboard": true, "automerge": true, diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 7d54ba8367..2ec8a40763 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -45,7 +45,7 @@ jobs: fi - name: pre-commit (PEP 735) if: steps.detect.outputs.method == 'pep735' - run: uv run --only-group pre-commit pre-commit run --all + run: uv run --no-sources --only-group pre-commit pre-commit run --all env: RUFF_OUTPUT_FORMAT: github REUSE_OUTPUT_FORMAT: github diff --git a/.github/workflows/yarn-update.yml b/.github/workflows/yarn-update.yml index 473c6e8ea5..644a206d83 100644 --- a/.github/workflows/yarn-update.yml +++ b/.github/workflows/yarn-update.yml @@ -15,6 +15,9 @@ on: - scripts/yarn-update - scripts/yarn/* - client/* + schedule: + - cron: 30 5 * * 0 + workflow_dispatch: permissions: contents: read @@ -28,7 +31,20 @@ jobs: 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 @@ -36,18 +52,28 @@ jobs: yarn build cd .. fi - - name: Update branch + + - 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 - automerge + + - 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 }}