Skip to content

Commit 61bcea3

Browse files
ci(actions): Update workflow templates from organization template repository
Signed-off-by: GitHub <noreply@github.com>
1 parent 70c1a01 commit 61bcea3

14 files changed

Lines changed: 102 additions & 167 deletions

.github/actions-lock.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
22
# SPDX-License-Identifier: MIT
3-
3db54dfe0671bf6c30556a5bb6487c22 block-merge-freeze.yml
4-
30c9fe81a0a80bcf36cc7d441fcb8f9d block-unconventional-commits.yml
5-
0c3e9b2e56e1b2590a005a80b55c3218 command-compile.yml
6-
4cb6e4935d3f2bc1e3c99c77739118ca cypress.yml
7-
cbffe424c47647a2e375f96f25b67af9 dependabot-approve-merge.yml
3+
25fc4c7e69e778e20bdc9eb0cc96367e block-merge-freeze.yml
4+
22ddcebff28350ddd79800a577323016 block-unconventional-commits.yml
5+
d81e4f0f0b5c64bb42e703ba521f7594 command-compile.yml
6+
8a87612df721733092485a4434e46c9a cypress.yml
7+
003108ea0f5c12e1db591cd4613304d8 dependabot-approve-merge.yml
88
2581a67c5bcdcd570427e6d51db767d7 fixup.yml
9-
54f293d9abe11ac0035a7bbb96a4e453 lint-eslint.yml
10-
ccd8a55c60e35b84becb0f7005ce1286 lint-php-cs.yml
11-
5dcc3187a9460cb62a455235cbdb3562 lint-php.yml
12-
cf229fbf443d2f7a303f22eb92745811 lint-stylelint.yml
13-
c965845a0def7b39d872e47e93dd1139 node.yml
14-
2d1e4038ee445a9fc1dcdb10c8036d34 npm-audit-fix.yml
9+
46a85bafa72379c179dd633e34abe000 lint-eslint.yml
10+
4f7ee6ee721c4646c0b78be5b08281a2 lint-php-cs.yml
11+
5641ed31bf9a8b1841fffbea34dbd7b2 lint-php.yml
12+
a5238a69743b834ad15f2e4354b98dbd lint-stylelint.yml
13+
03759c9dc0fa748cb927b9f9cadf2925 node.yml
14+
08570256d6bbb9cd33a905b16c742f8d npm-audit-fix.yml
1515
3c4a096b3b7dbaef0f8e5190ffe13518 pr-feedback.yml
16-
2070d9569f327e758b9ce2b924c28fef psalm.yml
17-
7db5b820f3750eebe988005a0bb2febd reuse.yml
18-
9748607544294975609be21633372bdd sync-workflow-templates.yml
19-
48c2c657b87747c9faeb589bcce08923 update-stable-titles.yml
16+
2f5f5a0851cc4bf00a0b89d009ab258a psalm.yml
17+
e2bd0fc8a290e1a8641487944e27103b reuse.yml
18+
e3c7b8f43850ad1d31c67fc0082b6bb8 sync-workflow-templates.yml
19+
22604c31b526de270a080eb19967a638 update-stable-titles.yml

.github/workflows/block-unconventional-commits.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727

2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3131
with:
3232
persist-credentials: false
3333

34-
- uses: webiny/action-conventional-commits@faccb24fc2550dd15c0390d944379d2d8ed9690e # v1.3.1
34+
- uses: webiny/action-conventional-commits@7f91b1595ca1951cdb671ddc9f07a49081ec5b69 # v1.4.2
3535
with:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/command-compile.yml

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ jobs:
5252
exit 1
5353
5454
- name: Check actor permission
55-
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v2
55+
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0
5656
with:
5757
require: write
5858

5959
- name: Add reaction on start
6060
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
6161
with:
62-
token: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env]
62+
token: ${{ secrets.COMMAND_BOT_PAT }}
6363
repository: ${{ github.event.repository.full_name }}
6464
comment-id: ${{ github.event.comment.id }}
6565
reactions: '+1'
6666

6767
- name: Parse command
68-
uses: skjnldsv/parse-command-comment@5c955203c52424151e6d0e58fb9de8a9f6a605a1 # v2
68+
uses: skjnldsv/parse-command-comment@5c955203c52424151e6d0e58fb9de8a9f6a605a1 # v3.1
6969
id: command
7070

7171
# Init path depending on which command is run
@@ -86,7 +86,7 @@ jobs:
8686
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
8787
if: failure()
8888
with:
89-
token: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env]
89+
token: ${{ secrets.COMMAND_BOT_PAT }}
9090
repository: ${{ github.event.repository.full_name }}
9191
comment-id: ${{ github.event.comment.id }}
9292
reactions: '-1'
@@ -97,17 +97,16 @@ jobs:
9797

9898
steps:
9999
- name: Restore cached git repository
100-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
100+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
101101
with:
102102
path: .git
103103
key: git-repo
104104

105105
- name: Checkout ${{ needs.init.outputs.head_ref }}
106-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
106+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
107107
with:
108-
# Needed to allow force push later
109-
persist-credentials: true
110-
token: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env]
108+
persist-credentials: false
109+
token: ${{ secrets.COMMAND_BOT_PAT }}
111110
fetch-depth: 0
112111
ref: ${{ needs.init.outputs.head_ref }}
113112

@@ -134,23 +133,25 @@ jobs:
134133

135134
- name: Rebase to ${{ needs.init.outputs.base_ref }}
136135
if: ${{ contains(needs.init.outputs.arg1, 'rebase') }}
136+
env:
137+
BASE_REF: ${{ needs.init.outputs.base_ref }}
137138
run: |
138-
git fetch origin '${{ needs.init.outputs.base_ref }}:${{ needs.init.outputs.base_ref }}'
139+
git fetch origin "${BASE_REF}:${BASE_REF}"
139140
140141
# Start the rebase
141-
git rebase 'origin/${{ needs.init.outputs.base_ref }}' || {
142+
git rebase "origin/${BASE_REF}" || {
142143
# Handle rebase conflicts in a loop
143144
while [ -d .git/rebase-merge ] || [ -d .git/rebase-apply ]; do
144145
echo "Handling rebase conflict..."
145146
146147
# Remove and checkout /dist and /js folders from the base branch
147148
if [ -d "dist" ]; then
148149
rm -rf dist
149-
git checkout origin/${{ needs.init.outputs.base_ref }} -- dist/ 2>/dev/null || echo "No dist folder in base branch"
150+
git checkout "origin/${BASE_REF}" -- dist/ 2>/dev/null || echo "No dist folder in base branch"
150151
fi
151152
if [ -d "js" ]; then
152153
rm -rf js
153-
git checkout origin/${{ needs.init.outputs.base_ref }} -- js/ 2>/dev/null || echo "No js folder in base branch"
154+
git checkout "origin/${BASE_REF}" -- js/ 2>/dev/null || echo "No js folder in base branch"
154155
fi
155156
156157
# Stage all changes
@@ -182,20 +183,26 @@ jobs:
182183
183184
- name: Commit default
184185
if: ${{ !contains(needs.init.outputs.arg1, 'fixup') && !contains(needs.init.outputs.arg1, 'amend') }}
186+
env:
187+
GIT_PATH: ${{ needs.init.outputs.git_path }}
185188
run: |
186-
git add '${{ github.workspace }}${{ needs.init.outputs.git_path }}'
189+
git add "${GITHUB_WORKSPACE}${GIT_PATH}"
187190
git commit --signoff -m 'chore(assets): Recompile assets'
188191
189192
- name: Commit fixup
190193
if: ${{ contains(needs.init.outputs.arg1, 'fixup') }}
194+
env:
195+
GIT_PATH: ${{ needs.init.outputs.git_path }}
191196
run: |
192-
git add '${{ github.workspace }}${{ needs.init.outputs.git_path }}'
197+
git add "${GITHUB_WORKSPACE}${GIT_PATH}"
193198
git commit --fixup=HEAD --signoff
194199
195200
- name: Commit amend
196201
if: ${{ contains(needs.init.outputs.arg1, 'amend') }}
202+
env:
203+
GIT_PATH: ${{ needs.init.outputs.git_path }}
197204
run: |
198-
git add '${{ github.workspace }}${{ needs.init.outputs.git_path }}'
205+
git add "${GITHUB_WORKSPACE}${GIT_PATH}"
199206
git commit --amend --no-edit --signoff
200207
# Remove any [skip ci] from the amended commit
201208
git commit --amend -m "$(git log -1 --format='%B' | sed '/\[skip ci\]/d')"
@@ -204,19 +211,25 @@ jobs:
204211
if: ${{ !contains(needs.init.outputs.arg1, 'rebase') && !contains(needs.init.outputs.arg1, 'amend') }}
205212
env:
206213
HEAD_REF: ${{ needs.init.outputs.head_ref }}
207-
run: git push origin "$HEAD_REF"
214+
BOT_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env]
215+
run: |
216+
git remote set-url origin "https://x-access-token:${BOT_TOKEN}@github.com/${{ github.repository }}.git"
217+
git push origin "$HEAD_REF"
208218
209219
- name: Force push
210220
if: ${{ contains(needs.init.outputs.arg1, 'rebase') || contains(needs.init.outputs.arg1, 'amend') }}
211221
env:
212222
HEAD_REF: ${{ needs.init.outputs.head_ref }}
213-
run: git push --force-with-lease origin "$HEAD_REF"
223+
BOT_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env]
224+
run: |
225+
git remote set-url origin "https://x-access-token:${BOT_TOKEN}@github.com/${{ github.repository }}.git"
226+
git push --force-with-lease origin "$HEAD_REF"
214227
215228
- name: Add reaction on failure
216229
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
217230
if: failure()
218231
with:
219-
token: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env]
232+
token: ${{ secrets.COMMAND_BOT_PAT }}
220233
repository: ${{ github.event.repository.full_name }}
221234
comment-id: ${{ github.event.comment.id }}
222235
reactions: '-1'

.github/workflows/cypress.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
exit 1
4747
4848
- name: Checkout app
49-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
49+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5050
with:
5151
persist-credentials: false
5252

@@ -81,7 +81,7 @@ jobs:
8181
TESTING=true npm run build --if-present
8282
8383
- name: Save context
84-
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
84+
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
8585
with:
8686
key: cypress-context-${{ github.run_id }}
8787
path: ./
@@ -93,17 +93,15 @@ jobs:
9393
strategy:
9494
fail-fast: false
9595
matrix:
96-
# Please increase the number or runners as your tests suite grows (0 based index for e2e tests)
97-
containers: [0, 1, 2, 3, 4, 5, 6, 7]
98-
# Hack as strategy.job-total includes the component and GitHub does not allow math expressions
99-
# Always align this number with the total of e2e runners (max. index + 1)
100-
total-containers: [8]
96+
# Run multiple copies of the current job in parallel
97+
# Please increase the number or runners as your tests suite grows
98+
containers: ['component', '1', '2', '3']
10199

102100
name: runner ${{ matrix.containers }}
103101

104102
steps:
105103
- name: Restore context
106-
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
104+
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
107105
with:
108106
fail-on-cache-miss: true
109107
key: cypress-context-${{ github.run_id }}
@@ -117,18 +115,17 @@ jobs:
117115
- name: Set up npm ${{ needs.init.outputs.npmVersion }}
118116
run: npm i -g 'npm@${{ needs.init.outputs.npmVersion }}'
119117

120-
- name: Install cypress
121-
run: ./node_modules/cypress/bin/cypress install
122-
123118
- name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests
124-
uses: cypress-io/github-action@b7a7441d775af8f8b9d19945c10dd689a51dba68 # v7.2.0
119+
uses: cypress-io/github-action@948d67d3074f1bbb6379c8bdbb04e95d2f8e593f # v7.4.0
125120
with:
126-
# We already installed the dependencies in the init job
127-
install: false
121+
record: ${{ secrets.CYPRESS_RECORD_KEY && true }}
122+
parallel: ${{ secrets.CYPRESS_RECORD_KEY && true }}
128123
# cypress run type
129124
component: ${{ matrix.containers == 'component' }}
130-
# Do not add Cypress record key config as this conflicts with cypress-split
131-
# Cypress again tries to force users to buy their dashboard...
125+
group: ${{ secrets.CYPRESS_RECORD_KEY && env.CYPRESS_GROUP }}
126+
# cypress env
127+
ci-build-id: ${{ secrets.CYPRESS_RECORD_KEY && env.CYPRESS_BUILD_ID }}
128+
tag: ${{ secrets.CYPRESS_RECORD_KEY && github.event_name }}
132129
env:
133130
# Needs to be prefixed with CYPRESS_
134131
CYPRESS_BRANCH: ${{ env.BRANCH }}
@@ -137,11 +134,12 @@ jobs:
137134
# Needed for some specific code workarounds
138135
TESTING: true
139136
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140-
SPLIT: ${{ matrix.total-containers }}
141-
SPLIT_INDEX: ${{ matrix.containers == 'component' && 0 || matrix.containers }}
137+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
138+
CYPRESS_BUILD_ID: ${{ github.sha }}-${{ github.run_number }}
139+
CYPRESS_GROUP: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }}
142140

143141
- name: Upload snapshots
144-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
142+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
145143
if: always()
146144
with:
147145
name: snapshots_${{ matrix.containers }}
@@ -152,7 +150,7 @@ jobs:
152150
run: docker logs nextcloud-cypress-tests-${{ env.APP_NAME }} > nextcloud.log
153151

154152
- name: Upload NC logs
155-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
153+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
156154
if: failure() && matrix.containers != 'component'
157155
with:
158156
name: nc_logs_${{ matrix.containers }}

.github/workflows/dependabot-approve-merge.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
if: github.event.pull_request.user.login == 'dependabot[bot]'
2828
runs-on: ubuntu-latest-low
2929
permissions:
30-
# for hmarr/auto-approve-action to approve PRs
30+
# for auto-approve step to work
3131
pull-requests: write
3232
# for alexwilson/enable-github-automerge-action to approve PRs
3333
contents: write
@@ -44,15 +44,22 @@ jobs:
4444
with:
4545
repo-token: ${{ secrets.GITHUB_TOKEN }}
4646

47-
# GitHub actions bot approve
48-
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
49-
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
47+
- name: Dependabot metadata
48+
id: metadata
49+
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
5050
with:
5151
github-token: ${{ secrets.GITHUB_TOKEN }}
5252

53+
- name: GitHub actions bot approve
54+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
55+
run: gh pr review --approve "$PR_URL"
56+
env:
57+
PR_URL: ${{ github.event.pull_request.html_url }}
58+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
5360
# Enable GitHub auto merge
5461
- name: Auto merge
55-
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
56-
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
62+
uses: alexwilson/enable-github-automerge-action@2c32e18a76e0726ffe7a573bfff2d42a20885126 # 3.0.0
63+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && (github.event.action == 'opened' || github.event.action == 'reopened') && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')
5764
with:
5865
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint-eslint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656

5757
steps:
5858
- name: Checkout
59-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
59+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
6060
with:
6161
persist-credentials: false
6262

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2929
with:
3030
persist-credentials: false
3131

@@ -34,7 +34,7 @@ jobs:
3434
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
3535

3636
- name: Set up php${{ steps.versions.outputs.php-min }}
37-
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
37+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
3838
with:
3939
php-version: ${{ steps.versions.outputs.php-min }}
4040
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite

.github/workflows/lint-php.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
php-max: ${{ steps.versions.outputs.php-max }}
2626
steps:
2727
- name: Checkout app
28-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2929
with:
3030
persist-credentials: false
3131

@@ -44,12 +44,12 @@ jobs:
4444

4545
steps:
4646
- name: Checkout
47-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
47+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4848
with:
4949
persist-credentials: false
5050

5151
- name: Set up php ${{ matrix.php-versions }}
52-
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
52+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
5353
with:
5454
php-version: ${{ matrix.php-versions }}
5555
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite

.github/workflows/lint-stylelint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2929
with:
3030
persist-credentials: false
3131

0 commit comments

Comments
 (0)