Skip to content

Commit 7a970d5

Browse files
authored
Merge pull request #242 from nextcloud/automated/update-workflows/stable28
chore: update workflows from templates
2 parents 7b0bba6 + 2e9b90d commit 7a970d5

File tree

7 files changed

+77
-55
lines changed

7 files changed

+77
-55
lines changed

.github/workflows/appstore-build-publish.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
types: [published]
1111

1212
env:
13-
PHP_VERSION: 8.1
13+
PHP_VERSION: 8.2
1414

1515
jobs:
1616
build_and_publish:
@@ -32,7 +32,7 @@ jobs:
3232
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3333
3434
- name: Checkout
35-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
35+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3636
with:
3737
path: ${{ env.APP_NAME }}
3838

@@ -44,19 +44,19 @@ jobs:
4444
expression: "//info//dependencies//nextcloud/@min-version"
4545

4646
- name: Read package.json node and npm engines version
47-
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
47+
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
4848
id: versions
4949
# Continue if no package.json
5050
continue-on-error: true
5151
with:
5252
path: ${{ env.APP_NAME }}
53-
fallbackNode: "^16"
54-
fallbackNpm: "^7"
53+
fallbackNode: '^20'
54+
fallbackNpm: '^9'
5555

5656
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
5757
# Skip if no package.json
5858
if: ${{ steps.versions.outputs.nodeVersion }}
59-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
59+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
6060
with:
6161
node-version: ${{ steps.versions.outputs.nodeVersion }}
6262

@@ -66,7 +66,7 @@ jobs:
6666
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
6767

6868
- name: Set up php ${{ env.PHP_VERSION }}
69-
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
69+
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
7070
with:
7171
php-version: ${{ env.PHP_VERSION }}
7272
coverage: none
@@ -88,6 +88,8 @@ jobs:
8888
- name: Build ${{ env.APP_NAME }}
8989
# Skip if no package.json
9090
if: ${{ steps.versions.outputs.nodeVersion }}
91+
env:
92+
CYPRESS_INSTALL_BINARY: 0
9193
run: |
9294
cd ${{ env.APP_NAME }}
9395
npm ci
@@ -126,7 +128,7 @@ jobs:
126128
unzip latest-$NCVERSION.zip
127129
128130
- name: Checkout server master fallback
129-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
131+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
130132
if: ${{ steps.server-checkout.outcome != 'success' }}
131133
with:
132134
submodules: true
@@ -149,7 +151,7 @@ jobs:
149151
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
150152
151153
- name: Attach tarball to github release
152-
uses: svenstaro/upload-release-action@2b9d2847a97b04d02ad5c3df2d3a27baa97ce689 # v2
154+
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
153155
id: attach_to_release
154156
with:
155157
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint-info-xml.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55

66
name: Lint info.xml
77

8-
on:
9-
pull_request:
10-
push:
11-
branches:
12-
- main
13-
- master
14-
- stable*
8+
on: pull_request
159

1610
permissions:
1711
contents: read
@@ -27,13 +21,13 @@ jobs:
2721
name: info.xml lint
2822
steps:
2923
- name: Checkout
30-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
24+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3125

3226
- name: Download schema
3327
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
3428

3529
- name: Lint info.xml
36-
uses: ChristophWurst/xmllint-action@39155a91429af431d65fafc21fa52ba5c4f5cb71 # v1.1
30+
uses: ChristophWurst/xmllint-action@36f2a302f84f8c83fceea0b9c59e1eb4a616d3c1 # v1.2
3731
with:
3832
xml-file: ./appinfo/info.xml
3933
xml-schema-file: ./info.xsd

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
25+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2626

27-
- name: Set up php
28-
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
27+
- name: Set up php8.2
28+
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
2929
with:
30-
php-version: 8.1
30+
php-version: 8.2
3131
coverage: none
3232
ini-file: development
3333
env:

.github/workflows/lint-php.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55

66
name: Lint php
77

8-
on:
9-
pull_request:
10-
push:
11-
branches:
12-
- main
13-
- master
14-
- stable*
8+
on: pull_request
159

1610
permissions:
1711
contents: read
@@ -25,16 +19,16 @@ jobs:
2519
runs-on: ubuntu-latest
2620
strategy:
2721
matrix:
28-
php-versions: [ "8.0", "8.1", "8.2" ]
22+
php-versions: [ '8.0', '8.1', '8.2', '8.3' ]
2923

3024
name: php-lint
3125

3226
steps:
3327
- name: Checkout
34-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
28+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3529

3630
- name: Set up php ${{ matrix.php-versions }}
37-
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
31+
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
3832
with:
3933
php-version: ${{ matrix.php-versions }}
4034
coverage: none

.github/workflows/pr-feedback.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
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+
16
name: 'Ask for feedback on PRs'
27
on:
38
schedule:
49
- cron: '30 1 * * *'
510

611
jobs:
712
pr-feedback:
8-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-latest
914
steps:
1015
- name: The get-github-handles-from-website action
1116
uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0
@@ -18,12 +23,12 @@ jobs:
1823
Hello there,
1924
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
2025
21-
We hope that the reviewing 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 reviewing process.
26+
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.
2227
2328
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
2429
2530
Thank you for contributing to Nextcloud and we hope to hear from you soon!
2631
days-before-feedback: 14
2732
start-date: "2023-07-10"
28-
exempt-authors: "${{ steps.scrape.outputs.users }}"
33+
exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot,skjnldsv,datenangebot"
2934
exempt-bots: true

.github/workflows/psalm.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55

66
name: Static analysis
77

8-
on:
9-
pull_request:
10-
push:
11-
branches:
12-
- master
13-
- main
14-
- stable*
8+
on: pull_request
159

1610
concurrency:
1711
group: psalm-${{ github.head_ref || github.run_id }}
@@ -21,15 +15,15 @@ jobs:
2115
static-analysis:
2216
runs-on: ubuntu-latest
2317

24-
name: Nextcloud
18+
name: static-psalm-analysis
2519
steps:
2620
- name: Checkout
27-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
21+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2822

29-
- name: Set up php
30-
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
23+
- name: Set up php8.2
24+
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
3125
with:
32-
php-version: 8.1
26+
php-version: 8.2
3327
coverage: none
3428
ini-file: development
3529
env:

.github/workflows/update-nextcloud-ocp.yml

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,57 +17,90 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
branches: ["main", "master", "stable27", "stable26", "stable25"]
20+
branches: ['main', 'master', 'stable28', 'stable27', 'stable26']
2121

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

2424
steps:
25-
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
25+
- id: checkout
26+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2627
with:
2728
ref: ${{ matrix.branches }}
2829
submodules: true
30+
continue-on-error: true
2931

30-
- name: Set up php8.1
31-
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
32+
- name: Set up php8.2
33+
if: steps.checkout.outcome == 'success'
34+
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
3235
with:
33-
php-version: 8.1
36+
php-version: 8.2
3437
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
3538
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
3639
coverage: none
3740
env:
3841
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3942

43+
- name: Read codeowners
44+
if: steps.checkout.outcome == 'success'
45+
id: codeowners
46+
run: |
47+
grep '/appinfo/info.xml' .github/CODEOWNERS | cut -f 2- -d ' ' | xargs | awk '{ print "codeowners="$0 }' >> $GITHUB_OUTPUT
48+
continue-on-error: true
49+
4050
- name: Composer install
51+
if: steps.checkout.outcome == 'success'
4152
run: composer install
4253

4354
- name: Composer update nextcloud/ocp
44-
if: matrix.branches != 'main'
55+
id: update_branch
56+
if: ${{ steps.checkout.outcome == 'success' && matrix.branches != 'main' }}
4557
run: composer require --dev nextcloud/ocp:dev-${{ matrix.branches }}
4658

59+
- name: Raise on issue on failure
60+
uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1
61+
if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_branch.conclusion == 'failure' }}
62+
with:
63+
token: ${{ secrets.GITHUB_TOKEN }}
64+
title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}
65+
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 }}
66+
4767
- name: Composer update nextcloud/ocp
48-
if: matrix.branches == 'main'
68+
id: update_main
69+
if: ${{ steps.checkout.outcome == 'success' && matrix.branches == 'main' }}
4970
run: composer require --dev nextcloud/ocp:dev-master
5071

72+
- name: Raise on issue on failure
73+
uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1
74+
if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_main.conclusion == 'failure' }}
75+
with:
76+
token: ${{ secrets.GITHUB_TOKEN }}
77+
title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}
78+
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 }}
79+
5180
- name: Reset checkout 3rdparty
81+
if: steps.checkout.outcome == 'success'
5282
run: |
5383
git clean -f 3rdparty
5484
git checkout 3rdparty
5585
continue-on-error: true
5686

5787
- name: Reset checkout vendor
88+
if: steps.checkout.outcome == 'success'
5889
run: |
5990
git clean -f vendor
6091
git checkout vendor
6192
continue-on-error: true
6293

6394
- name: Reset checkout vendor-bin
95+
if: steps.checkout.outcome == 'success'
6496
run: |
6597
git clean -f vendor-bin
6698
git checkout vendor-bin
6799
continue-on-error: true
68100

69101
- name: Create Pull Request
70-
uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 # v3
102+
if: steps.checkout.outcome == 'success'
103+
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v3
71104
with:
72105
token: ${{ secrets.COMMAND_BOT_PAT }}
73106
commit-message: "chore(dev-deps): Bump nextcloud/ocp package"

0 commit comments

Comments
 (0)