Skip to content

Commit a6d0416

Browse files
authored
Merge pull request #4240 from nextcloud/ci/update-actions-26
2 parents a48adb5 + c76b18c commit a6d0416

19 files changed

+203
-113
lines changed

.github/workflows/block-merge-freeze.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,25 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: Pull request checks
6+
name: Block merges during freezes
77

8-
on: pull_request
8+
on:
9+
pull_request:
10+
types: [opened, ready_for_review, reopened, synchronize]
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
group: block-merge-freeze-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
918

1019
jobs:
1120
block-merges-during-freeze:
1221
name: Block merges during freezes
1322

23+
if: github.event.pull_request.draft == false
24+
1425
runs-on: ubuntu-latest
1526

1627
steps:

.github/workflows/command-compile.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ jobs:
1818

1919
steps:
2020
- name: Check actor permission
21-
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1
21+
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2
2222
with:
2323
require: write
2424

2525
- name: Add reaction on start
26-
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 # v2.1.0
26+
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
2727
with:
2828
token: ${{ secrets.COMMAND_BOT_PAT }}
2929
repository: ${{ github.event.repository.full_name }}
3030
comment-id: ${{ github.event.comment.id }}
31-
reaction-type: "+1"
31+
reactions: "+1"
3232

3333
- name: Parse command
34-
uses: skjnldsv/parse-command-comment@e9cb9d1df338afed4295a59bbe27b4da53fd38a8 # master
34+
uses: skjnldsv/parse-command-comment@7cef1df370a99dfd5bf896d50121390c96785db8 # v2
3535
id: command
3636

3737
# Init path depending on which command is run
@@ -45,7 +45,7 @@ jobs:
4545
fi
4646
4747
- name: Init branch
48-
uses: xt0rted/pull-request-comment-branch@653a7d5ca8bd91d3c5cb83286063314d0b063b8e # v1
48+
uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1
4949
id: comment-branch
5050

5151
process:
@@ -54,7 +54,7 @@ jobs:
5454

5555
steps:
5656
- name: Checkout ${{ needs.init.outputs.head_ref }}
57-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
57+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
5858
with:
5959
token: ${{ secrets.COMMAND_BOT_PAT }}
6060
fetch-depth: 0
@@ -66,14 +66,14 @@ jobs:
6666
git config --local user.name "nextcloud-command"
6767
6868
- name: Read package.json node and npm engines version
69-
uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
69+
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
7070
id: package-engines-versions
7171
with:
7272
fallbackNode: '^16'
7373
fallbackNpm: '^7'
7474

7575
- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
76-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
76+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
7777
with:
7878
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
7979
cache: npm
@@ -90,7 +90,7 @@ jobs:
9090
if: ${{ needs.init.outputs.arg1 != 'fixup' && needs.init.outputs.arg1 != 'amend' }}
9191
run: |
9292
git add ${{ needs.init.outputs.git_path }}
93-
git commit --signoff -m 'Compile assets'
93+
git commit --signoff -m 'chore(assets): Recompile assets'
9494
git push origin ${{ needs.init.outputs.head_ref }}
9595
9696
- name: Commit and push fixup
@@ -108,10 +108,10 @@ jobs:
108108
git push --force origin ${{ needs.init.outputs.head_ref }}
109109
110110
- name: Add reaction on failure
111-
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 # v2.1.0
111+
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
112112
if: failure()
113113
with:
114114
token: ${{ secrets.COMMAND_BOT_PAT }}
115115
repository: ${{ github.event.repository.full_name }}
116116
comment-id: ${{ github.event.comment.id }}
117-
reaction-type: "-1"
117+
reactions: "-1"

.github/workflows/command-rebase.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,26 @@ jobs:
2323

2424
steps:
2525
- name: Add reaction on start
26-
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 # v2.1.0
26+
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
2727
with:
2828
token: ${{ secrets.COMMAND_BOT_PAT }}
2929
repository: ${{ github.event.repository.full_name }}
3030
comment-id: ${{ github.event.comment.id }}
3131
reaction-type: "+1"
3232

3333
- name: Checkout the latest code
34-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
34+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3535
with:
3636
fetch-depth: 0
3737
token: ${{ secrets.COMMAND_BOT_PAT }}
3838

3939
- name: Automatic Rebase
40-
uses: cirrus-actions/rebase@6e572f08c244e2f04f9beb85a943eb618218714d # 1.7
40+
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
4343

4444
- name: Add reaction on failure
45-
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 # v2.1.0
45+
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
4646
if: failure()
4747
with:
4848
token: ${{ secrets.COMMAND_BOT_PAT }}

.github/workflows/cypress.yml

+50-32
Original file line numberDiff line numberDiff line change
@@ -18,56 +18,55 @@ env:
1818

1919
jobs:
2020
init:
21-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-22.04
22+
outputs:
23+
nodeVersion: ${{ steps.versions.outputs.nodeVersion }}
24+
npmVersion: ${{ steps.versions.outputs.npmVersion }}
2225

2326
steps:
24-
2527
- name: Checkout server
26-
uses: actions/checkout@v3
28+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
2729
with:
2830
repository: nextcloud/server
2931
ref: ${{ matrix.server-versions }}
30-
31-
- name: Checkout submodules
32-
shell: bash
33-
run: |
34-
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
35-
git submodule sync --recursive
36-
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
32+
submodules: true
3733

3834
- name: Checkout viewer
39-
uses: actions/checkout@v3
35+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
4036
with:
4137
repository: nextcloud/viewer
4238
ref: ${{ matrix.server-versions }}
4339
path: apps/viewer
4440

4541
- name: Checkout app
46-
uses: actions/checkout@v3
42+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
4743
with:
4844
path: apps/${{ env.APP_NAME }}
4945

50-
- name: Set up node 16
51-
uses: actions/setup-node@v3
46+
- name: Read package.json node and npm engines version
47+
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
48+
id: versions
49+
with:
50+
fallbackNode: "^14"
51+
fallbackNpm: "^7"
52+
53+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
54+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
5255
with:
5356
cache: 'npm'
54-
cache-dependency-path: apps/${{ env.APP_NAME}}/package-lock.json
55-
node-version: 16
57+
node-version: ${{ steps.versions.outputs.nodeVersion }}
5658

57-
- name: Install dependencies & build app
58-
working-directory: apps/${{ env.APP_NAME }}
59-
run: |
60-
npm ci
61-
TESTING=true npm run build --if-present
59+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
60+
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
6261

6362
- name: Save context
64-
uses: actions/cache@v3
63+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
6564
with:
6665
key: cypress-context-${{ github.run_id }}
67-
path: /home/runner/work
66+
path: ./
6867

6968
cypress:
70-
runs-on: ubuntu-latest
69+
runs-on: ubuntu-22.04
7170
needs: init
7271

7372
strategy:
@@ -77,19 +76,26 @@ jobs:
7776
containers: [1, 2, 3, 4, 5, 6, 7, 8]
7877
php-versions: [ '8.1' ]
7978
databases: [ 'sqlite' ]
80-
server-versions: [ 'stable26' ]
79+
server-versions: ['stable26']
8180

82-
steps:
83-
- name: Use Node.js ${{ matrix.node-version }}
84-
uses: actions/setup-node@v3
85-
with:
86-
node-version: ${{ matrix.node-version }}
81+
name: runner ${{ matrix.containers }}
8782

83+
steps:
8884
- name: Restore context
89-
uses: actions/cache@v3
85+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
9086
with:
87+
fail-on-cache-miss: true
9188
key: cypress-context-${{ github.run_id }}
92-
path: /home/runner/work
89+
path: ./
90+
91+
- name: Set up node ${{ needs.init.outputs.nodeVersion }}
92+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
93+
with:
94+
cache: 'npm'
95+
node-version: ${{ needs.init.outputs.nodeVersion }}
96+
97+
- name: Set up npm ${{ needs.init.outputs.npmVersion }}
98+
run: npm i -g npm@"${{ needs.init.outputs.npmVersion }}"
9399

94100
- name: Set up php ${{ matrix.php-versions }}
95101
uses: shivammathur/setup-php@v2
@@ -150,3 +156,15 @@ jobs:
150156
name: Upload nextcloud log
151157
path: data/nextcloud.log
152158
retention-days: 5
159+
160+
summary:
161+
runs-on: ubuntu-latest
162+
needs: [init, cypress]
163+
164+
if: always()
165+
166+
name: cypress-summary
167+
168+
steps:
169+
- name: Summary status
170+
run: if ${{ needs.init.result != 'success' || ( needs.cypress.result != 'success' && needs.cypress.result != 'skipped' ) }}; then exit 1; fi

.github/workflows/fixup.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: Pull request checks
6+
name: Block fixup and squash commits
77

88
on:
99
pull_request:
10-
types: [opened, ready_for_review, reopened]
10+
types: [opened, ready_for_review, reopened, synchronize]
1111

1212
permissions:
1313
contents: read
@@ -28,6 +28,6 @@ jobs:
2828

2929
steps:
3030
- name: Run check
31-
uses: xt0rted/block-autosquash-commits-action@79880c36b4811fe549cfffe20233df88876024e7 # v2
31+
uses: skjnldsv/block-fixup-merge-action@42d26e1b536ce61e5cf467d65fb76caf4aa85acf # v1
3232
with:
3333
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint-eslint-when-unrelated.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions
77
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
88

9-
name: Lint
9+
name: Lint eslint
1010

1111
on:
1212
pull_request:

.github/workflows/lint-eslint.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions
77
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
88

9-
name: Lint
9+
name: Lint eslint
1010

1111
on:
1212
pull_request:
@@ -38,17 +38,17 @@ jobs:
3838

3939
steps:
4040
- name: Checkout
41-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
41+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
4242

4343
- name: Read package.json node and npm engines version
44-
uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
44+
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
4545
id: versions
4646
with:
4747
fallbackNode: '^16'
4848
fallbackNpm: '^7'
4949

5050
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
51-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
51+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
5252
with:
5353
node-version: ${{ steps.versions.outputs.nodeVersion }}
5454

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: Lint
6+
name: Lint php-cs
77

88
on: pull_request
99

@@ -22,13 +22,14 @@ jobs:
2222

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

2727
- name: Set up php
28-
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
28+
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
2929
with:
3030
php-version: 8.1
3131
coverage: none
32+
ini-file: development
3233
env:
3334
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3435

.github/workflows/lint-php.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: Lint
6+
name: Lint php
77

88
on:
99
pull_request:
@@ -31,13 +31,14 @@ jobs:
3131

3232
steps:
3333
- name: Checkout
34-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
34+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3535

3636
- name: Set up php ${{ matrix.php-versions }}
37-
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
37+
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
3838
with:
3939
php-version: ${{ matrix.php-versions }}
4040
coverage: none
41+
ini-file: development
4142
env:
4243
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4344

0 commit comments

Comments
 (0)