Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/actions-lock.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
9f2b534bea27e8ec2dda7c1d772a664b block-merge-eol.yml
25fc4c7e69e778e20bdc9eb0cc96367e block-merge-freeze.yml
acad44f3e99b665897766ce90374dd03 block-merge-freeze.yml
e6351c608939c31ae1e32923aa82aa10 dependabot-approve-merge.yml
43fd0c5fb704cabc5f11cdfaf513236d lint-info-xml.yml
4b40dd0073e16f74dd04e6d49dcc043d lint-php-cs.yml
cfb31e47b6e9ab65e76c89b028754a4e lint-php.yml
4ca2c2c4b1a73182667bab908e57c185 phpunit-sqlite.yml
d1821b8a816578070ed8fd018f321f6d pr-feedback.yml
6dc046dfbca5dc65d938265c518fcac4 psalm.yml
79006ab196f5664fc444e63645cfd8a7 lint-php-cs.yml
300be6a756abda800e40850918f2d964 lint-php.yml
ba5a538fea1a9e53dfcbeb53b83ea6fa phpunit-sqlite.yml
aaa395a26591445ccf4c8196d7f01ee7 pr-feedback.yml
4f1080b33778a956a08efc7a41a11994 psalm.yml
2dbec18233063b42f4d8e03bbb43671c reuse.yml
94c65e30a77686c079c6dfa54a008440 sync-workflow-templates.yml
a3440826636c0fd7c2d20b1de50363da update-nextcloud-ocp-approve-merge.yml
f5632e6d28c6afca9d4d46131fb48d57 update-nextcloud-ocp.yml
511439ba27869e0324f283142cc8b3df sync-workflow-templates.yml
abcb8206c3f6c5a9dc86cccf57846bfc update-nextcloud-ocp-approve-merge.yml
f951ce2c95c9fcf7f4122b6f4f44618d update-nextcloud-ocp.yml
22604c31b526de270a080eb19967a638 update-stable-titles.yml
2 changes: 1 addition & 1 deletion .github/workflows/block-merge-freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:

- name: Run check
if: ${{ env.server_ref != '' }}
run: cat version.php | grep 'OC_VersionString' | grep -i -v 'RC'
run: cat version.php | grep 'OC_VersionString' | grep -i -v -E '(\.0\.0 RC[3-9]|\.[1-9][0-9]* RC)'
2 changes: 1 addition & 1 deletion .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Get php version
id: versions
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3

- name: Set up php${{ steps.versions.outputs.php-min }}
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Get version matrix
id: versions
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3

php-lint:
runs-on: ubuntu-latest-low
Expand Down
46 changes: 22 additions & 24 deletions .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,19 @@ concurrency:
cancel-in-progress: true

jobs:
matrix:
runs-on: ubuntu-latest-low
outputs:
php-version: ${{ steps.versions.outputs.php-available-list }}
server-max: ${{ steps.versions.outputs.branches-max-list }}
steps:
- name: Checkout app
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Get version matrix
id: versions
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2

changes:
changes-and-matrix:
runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read

outputs:
src: ${{ steps.changes.outputs.src}}
src: ${{ steps.changes.outputs.src }}
php-version: ${{ steps.versions.outputs.php-available-list }}
server-max: ${{ steps.versions.outputs.branches-max-list }}

steps:
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
Expand All @@ -60,17 +47,28 @@ jobs:
- 'composer.json'
- 'composer.lock'

- name: Checkout app
if: steps.changes.outputs.src != 'false'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Get version matrix
if: steps.changes.outputs.src != 'false'
id: versions
uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3

phpunit-sqlite:
runs-on: ubuntu-latest

needs: [changes, matrix]
if: needs.changes.outputs.src != 'false'
needs: changes-and-matrix
if: needs.changes-and-matrix.outputs.src != 'false'

strategy:
fail-fast: false
matrix:
php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
php-versions: ${{ fromJson(needs.changes-and-matrix.outputs.php-version) }}
server-versions: ${{ fromJson(needs.changes-and-matrix.outputs.server-max) }}

name: SQLite PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}

Expand Down Expand Up @@ -181,12 +179,12 @@ jobs:
permissions:
contents: none
runs-on: ubuntu-latest-low
needs: [changes, phpunit-sqlite]
needs: [changes-and-matrix, phpunit-sqlite]

if: always()

name: phpunit-sqlite-summary

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi
run: if ${{ needs.changes-and-matrix.outputs.src != 'false' && needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi
2 changes: 1 addition & 1 deletion .github/workflows/pr-feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -)
echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT"

- uses: nextcloud/pr-feedback-action@5227c55be184087d0aef6338bee210d8620b6297 # v1.0.1
- uses: nextcloud-libraries/pr-feedback-action@5227c55be184087d0aef6338bee210d8620b6297 # v1.0.1
with:
feedback-message: |
Hello there,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: Get php version
id: versions
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3

- name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-workflow-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
matrix:
branches:
- ${{ github.event.repository.default_branch }}
- 'stable35'
- 'stable34'
- 'stable33'
- 'stable32'

name: Update workflows in ${{ matrix.branches }}

Expand Down
49 changes: 11 additions & 38 deletions .github/workflows/update-nextcloud-ocp-approve-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,27 @@
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Auto approve nextcloud/ocp
# TODO: Remove this after a grace period of 6 months to give everyone the chance to remove the workflow
# TODO: To be removed mid 2027.
name: No-op please remove this workflow

on:
pull_request_target: # zizmor: ignore[dangerous-triggers]
branches:
- main
- master
- stable*
on: pull_request

permissions:
contents: read
contents: none

concurrency:
group: update-nextcloud-ocp-approve-merge-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
auto-approve-merge:
if: github.actor == 'nextcloud-command'
runs-on: ubuntu-latest-low
permissions:
# for auto-approve-action to approve PRs
pull-requests: write
# for alexwilson/enable-github-automerge-action to approve PRs
contents: write
if: always()

steps:
- name: Disabled on forks
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
run: |
echo 'Can not approve PRs from forks'
exit 1

- uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0
id: branchname
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# This is the summary, we just avoid to rename it so that branch protection rules still match
name: auto-approve-merge

- name: GitHub actions bot approve
if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp')
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Enable GitHub auto merge
- name: Auto merge
uses: alexwilson/enable-github-automerge-action@2c32e18a76e0726ffe7a573bfff2d42a20885126 # 3.0.0
if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp')
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: No-op please remove this workflow
run: echo "Approve and auto-merge has been folded into update-nextcloud-ocp.yml / update-nextcloud-ocp-matrix.yml, please remove this file"; exit 1;
28 changes: 25 additions & 3 deletions .github/workflows/update-nextcloud-ocp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ on:
- cron: "5 2 * * 0"

permissions:
contents: read
contents: write
issues: write
pull-requests: write

jobs:
update-nextcloud-ocp:
Expand All @@ -24,14 +25,18 @@ jobs:
# Only allowed to be run on nextcloud repositories
if: ${{ github.repository_owner == 'nextcloud' }}

env:
# env variable for maintainers: 'false' disables auto-merge for these pull requests
AUTOMERGE: true

strategy:
fail-fast: false
matrix:
branches:
- ${{ github.event.repository.default_branch }}
- 'stable35'
- 'stable34'
- 'stable33'
- 'stable32'

name: update-nextcloud-ocp-${{ matrix.branches }}

Expand Down Expand Up @@ -100,6 +105,7 @@ jobs:
body: 'Please check the output of the GitHub action and manually resolve the issues<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }}'

- name: Create Pull Request
id: create-pull-request
if: steps.checkout.outcome == 'success'
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
Expand All @@ -110,7 +116,7 @@ jobs:
signoff: true
branch: 'automated/noid/${{ matrix.branches }}-update-nextcloud-ocp'
title: '[${{ matrix.branches }}] Update nextcloud/ocp dependency'
add-path: |
add-paths: |
composer.json
composer.lock
vendor-bin/nextcloud-ocp/composer.json
Expand All @@ -120,3 +126,19 @@ jobs:
labels: |
dependencies
3. to review

# Approve using the default GITHUB_TOKEN, as the PR itself was created
# using COMMAND_BOT_PAT and GitHub does not allow an account to approve its own PR
- name: GitHub actions bot approve
if: steps.create-pull-request.outputs.pull-request-operation != 'none'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ steps.create-pull-request.outputs.pull-request-url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Enable auto merge
if: steps.create-pull-request.outputs.pull-request-operation != 'none' && fromJSON(env.AUTOMERGE)
uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.create-pull-request.outputs.pull-request-number }}
Loading