Skip to content

Commit dc9dd39

Browse files
committed
chore(ci): update workflows from .github repository
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
1 parent 9304dcd commit dc9dd39

File tree

4 files changed

+65
-16
lines changed

4 files changed

+65
-16
lines changed

.github/workflows/lint-php-cs.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint php-cs
710

@@ -22,19 +25,24 @@ jobs:
2225

2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
with:
30+
persist-credentials: false
2631

2732
- name: Set up php8.2
28-
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
33+
uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4
2934
with:
3035
php-version: 8.2
36+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
3137
coverage: none
3238
ini-file: development
3339
env:
3440
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3541

3642
- name: Install dependencies
37-
run: composer i
43+
run: |
44+
composer remove nextcloud/ocp --dev --no-scripts
45+
composer i
3846
3947
- name: Lint
4048
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

.github/workflows/lint-php.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint php
710

@@ -19,18 +22,21 @@ jobs:
1922
runs-on: ubuntu-latest
2023
strategy:
2124
matrix:
22-
php-versions: [ '8.0', '8.1', '8.2', '8.3' ]
25+
php-versions: ["8.0", "8.1", "8.2", "8.3"]
2326

2427
name: php-lint
2528

2629
steps:
2730
- name: Checkout
28-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
31+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
32+
with:
33+
persist-credentials: false
2934

3035
- name: Set up php ${{ matrix.php-versions }}
31-
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
36+
uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4
3237
with:
3338
php-version: ${{ matrix.php-versions }}
39+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
3440
coverage: none
3541
ini-file: development
3642
env:
@@ -42,7 +48,7 @@ jobs:
4248
summary:
4349
permissions:
4450
contents: none
45-
runs-on: ubuntu-latest
51+
runs-on: ubuntu-latest-low
4652
needs: php-lint
4753

4854
if: always()

.github/workflows/pr-feedback.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,53 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6+
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-FileCopyrightText: 2023 Marcel Klehr <mklehr@gmx.net>
8+
# SPDX-FileCopyrightText: 2023 Joas Schilling <213943+nickvergessen@users.noreply.github.com>
9+
# SPDX-FileCopyrightText: 2023 Daniel Kesselberg <mail@danielkesselberg.de>
10+
# SPDX-FileCopyrightText: 2023 Florian Steffens <florian.steffens@nextcloud.com>
11+
# SPDX-License-Identifier: MIT
12+
613
name: 'Ask for feedback on PRs'
714
on:
815
schedule:
916
- cron: '30 1 * * *'
1017

18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
1122
jobs:
1223
pr-feedback:
24+
if: ${{ github.repository_owner == 'nextcloud' }}
1325
runs-on: ubuntu-latest
1426
steps:
1527
- name: The get-github-handles-from-website action
16-
uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0
28+
uses: marcelklehr/get-github-handles-from-website-action@06b2239db0a48fe1484ba0bfd966a3ab81a08308 # v1.0.1
1729
id: scrape
1830
with:
1931
website: 'https://nextcloud.com/team/'
20-
- uses: marcelklehr/pr-feedback-action@601109aa729eb4c8d6d0ece7567b9d4901db4aef
32+
33+
- name: Get blocklist
34+
id: blocklist
35+
run: |
36+
blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -)
37+
echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT"
38+
39+
- uses: nextcloud/pr-feedback-action@f0cab224dea8e1f282f9451de322f323c78fc7a5 # main
2140
with:
2241
feedback-message: |
2342
Hello there,
24-
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
43+
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
2544
2645
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
2746
2847
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
2948
3049
Thank you for contributing to Nextcloud and we hope to hear from you soon!
50+
51+
(If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).)
3152
days-before-feedback: 14
32-
start-date: "2023-07-10"
33-
exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot,skjnldsv,datenangebot"
53+
start-date: '2025-06-12'
54+
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}'
3455
exempt-bots: true

.github/workflows/psalm.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Static analysis
710

@@ -11,26 +14,37 @@ concurrency:
1114
group: psalm-${{ github.head_ref || github.run_id }}
1215
cancel-in-progress: true
1316

17+
permissions:
18+
contents: read
19+
1420
jobs:
1521
static-analysis:
1622
runs-on: ubuntu-latest
1723

1824
name: static-psalm-analysis
1925
steps:
2026
- name: Checkout
21-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
28+
with:
29+
persist-credentials: false
2230

2331
- name: Set up php8.2
24-
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
32+
uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4
2533
with:
2634
php-version: 8.2
35+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
2736
coverage: none
2837
ini-file: development
2938
env:
3039
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3140

3241
- name: Install dependencies
33-
run: composer i
42+
run: |
43+
composer remove nextcloud/ocp --dev --no-scripts
44+
composer i
45+
46+
- name: Check for vulnerable PHP dependencies
47+
run: composer require --dev roave/security-advisories:dev-latest
3448

3549
- name: Run coding standards check
36-
run: composer run psalm
50+
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github

0 commit comments

Comments
 (0)