Skip to content

Commit 16cf107

Browse files
committed
chore(deps): add Rector workflow
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
1 parent 5af10c1 commit 16cf107

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/rector-apply.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: Apply rector changes
10+
11+
on:
12+
workflow_dispatch:
13+
schedule:
14+
# At 14:30 on Sundays
15+
- cron: "30 14 * * 0"
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
24+
name: rector-apply
25+
26+
steps:
27+
- name: Checkout
28+
id: checkout
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30+
with:
31+
persist-credentials: false
32+
ref: ${{ github.event.repository.default_branch }}
33+
34+
- name: Get php version
35+
id: versions
36+
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
37+
38+
- name: Set up php${{ steps.versions.outputs.php-min }}
39+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
40+
with:
41+
php-version: ${{ steps.versions.outputs.php-min }}
42+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
43+
coverage: none
44+
ini-file: development
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: Install dependencies
49+
run: |
50+
composer remove nextcloud/ocp --dev --no-scripts
51+
composer i
52+
53+
- name: Rector
54+
run: composer run rector
55+
56+
- name: Create Pull Request
57+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
58+
with:
59+
token: ${{ secrets.COMMAND_BOT_PAT }}
60+
commit-message: "refactor: Apply rector changes"
61+
committer: GitHub <noreply@github.com>
62+
author: nextcloud-command <nextcloud-command@users.noreply.github.com>
63+
signoff: true
64+
branch: automated/noid/rector-changes
65+
title: "Apply rector changes"
66+
labels: |
67+
technical debt
68+
3. to review

0 commit comments

Comments
 (0)