Skip to content

Commit 099b053

Browse files
ci(gh): Sync actions with current workflow templates except for ocp and node/npm versions
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 parent 34557fc commit 099b053

17 files changed

Lines changed: 100 additions & 85 deletions

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

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ jobs:
3535
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3636
3737
- name: Checkout
38-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
38+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3939
with:
4040
persist-credentials: false
4141
path: ${{ env.APP_NAME }}
4242

4343
- name: Get app version number
4444
id: app-version
45-
uses: skjnldsv/xpath-action@d813024a13948950fd8d23b580254feeb4883d3c # master
45+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
4646
with:
4747
filename: ${{ env.APP_NAME }}/appinfo/info.xml
4848
expression: "//info//version/text()"
@@ -53,7 +53,7 @@ jobs:
5353
5454
- name: Get appinfo data
5555
id: appinfo
56-
uses: skjnldsv/xpath-action@d813024a13948950fd8d23b580254feeb4883d3c # master
56+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
5757
with:
5858
filename: ${{ env.APP_NAME }}/appinfo/info.xml
5959
expression: "//info//dependencies//nextcloud/@min-version"
@@ -71,7 +71,7 @@ jobs:
7171
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
7272
# Skip if no package.json
7373
if: ${{ steps.versions.outputs.nodeVersion }}
74-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
74+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
7575
with:
7676
node-version: ${{ steps.versions.outputs.nodeVersion }}
7777

@@ -82,12 +82,12 @@ jobs:
8282

8383
- name: Get php version
8484
id: php-versions
85-
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
85+
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
8686
with:
8787
filename: ${{ env.APP_NAME }}/appinfo/info.xml
8888

8989
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
90-
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
90+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
9191
with:
9292
php-version: ${{ steps.php-versions.outputs.php-min }}
9393
coverage: none
@@ -96,7 +96,7 @@ jobs:
9696

9797
- name: Check composer.json
9898
id: check_composer
99-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
99+
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0
100100
with:
101101
files: "${{ env.APP_NAME }}/composer.json"
102102

@@ -118,7 +118,7 @@ jobs:
118118
119119
- name: Check Krankerl config
120120
id: krankerl
121-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
121+
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0
122122
with:
123123
files: ${{ env.APP_NAME }}/krankerl.toml
124124

@@ -140,31 +140,39 @@ jobs:
140140
cd ${{ env.APP_NAME }}
141141
make appstore
142142
143-
- name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
144-
continue-on-error: true
145-
id: server-checkout
143+
- name: Check server download link for ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
146144
run: |
147145
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
148-
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
149-
unzip latest-$NCVERSION.zip
146+
DOWNLOAD_URL=$(curl -s "https://updates.nextcloud.com/updater_server/latest?channel=beta&version=$NCVERSION" | jq -r '.downloads.zip[0]')
147+
echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV
148+
149+
- name: Download server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
150+
continue-on-error: true
151+
id: server-download
152+
if: ${{ env.DOWNLOAD_URL != 'null' }}
153+
run: |
154+
echo "Downloading release tarball from $DOWNLOAD_URL"
155+
wget $DOWNLOAD_URL -O nextcloud.zip
156+
unzip nextcloud.zip
150157
151158
- name: Checkout server master fallback
152-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
153-
if: ${{ steps.server-checkout.outcome != 'success' }}
159+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
160+
if: ${{ steps.server-download.outcome != 'success' }}
154161
with:
155162
persist-credentials: false
156163
submodules: true
157164
repository: nextcloud/server
158165
path: nextcloud
159166

167+
160168
- name: Sign app
161169
run: |
162170
# Extracting release
163171
cd ${{ env.APP_NAME }}/build/artifacts
164172
tar -xvf ${{ env.APP_NAME }}.tar.gz
165173
cd ../../../
166174
# Setting up keys
167-
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
175+
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key # zizmor: ignore[secrets-outside-env]
168176
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
169177
# Signing
170178
php nextcloud/occ integrity:sign-app --privateKey=../${{ env.APP_NAME }}.key --certificate=../${{ env.APP_NAME }}.crt --path=../${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}
@@ -173,7 +181,7 @@ jobs:
173181
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
174182
175183
- name: Attach tarball to github release
176-
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2
184+
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # v2.11.5
177185
id: attach_to_release
178186
with:
179187
repo_token: ${{ secrets.GITHUB_TOKEN }}
@@ -183,9 +191,9 @@ jobs:
183191
overwrite: true
184192

185193
- name: Upload app to Nextcloud appstore
186-
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
194+
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3
187195
with:
188196
app_name: ${{ env.APP_NAME }}
189-
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
197+
appstore_token: ${{ secrets.APPSTORE_TOKEN }} # zizmor: ignore[secrets-outside-env]
190198
download_url: ${{ steps.attach_to_release.outputs.browser_download_url }}
191-
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
199+
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} # zizmor: ignore[secrets-outside-env]

.github/workflows/lint-eslint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
src: ${{ steps.changes.outputs.src}}
2929

3030
steps:
31-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
31+
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
3232
id: changes
3333
continue-on-error: true
3434
with:
@@ -56,7 +56,7 @@ jobs:
5656

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

@@ -68,7 +68,7 @@ jobs:
6868
fallbackNpm: '^10'
6969

7070
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
71-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
71+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
7272
with:
7373
node-version: ${{ steps.versions.outputs.nodeVersion }}
7474

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
name: info.xml lint
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2828
with:
2929
persist-credentials: false
3030

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

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

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

3232
- name: Get php version
3333
id: versions
34-
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
34+
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@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
37+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
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: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,35 @@ jobs:
2121
matrix:
2222
runs-on: ubuntu-latest-low
2323
outputs:
24-
php-versions: ${{ steps.versions.outputs.php-versions }}
24+
php-min: ${{ steps.versions.outputs.php-min }}
25+
php-max: ${{ steps.versions.outputs.php-max }}
2526
steps:
2627
- name: Checkout app
27-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2829
with:
2930
persist-credentials: false
3031

3132
- name: Get version matrix
3233
id: versions
33-
uses: icewind1991/nextcloud-version-matrix@c2bf575a3516752db5ce2915499d3f694885e2c7 # v1.0.0
34+
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
3435

3536
php-lint:
3637
runs-on: ubuntu-latest
3738
needs: matrix
3839
strategy:
3940
matrix:
40-
php-versions: ${{fromJson(needs.matrix.outputs.php-versions)}}
41+
php-versions: ['${{ needs.matrix.outputs.php-min }}', '${{ needs.matrix.outputs.php-max }}']
4142

4243
name: php-lint
4344

4445
steps:
4546
- name: Checkout
46-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
47+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4748
with:
4849
persist-credentials: false
4950

5051
- name: Set up php ${{ matrix.php-versions }}
51-
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
52+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
5253
with:
5354
php-version: ${{ matrix.php-versions }}
5455
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: 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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2929
with:
3030
persist-credentials: false
3131

@@ -37,7 +37,7 @@ jobs:
3737
fallbackNpm: '^10'
3838

3939
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
40-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
40+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
4141
with:
4242
node-version: ${{ steps.versions.outputs.nodeVersion }}
4343

.github/workflows/node.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
src: ${{ steps.changes.outputs.src}}
2929

3030
steps:
31-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
31+
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
3232
id: changes
3333
continue-on-error: true
3434
with:
@@ -53,7 +53,7 @@ jobs:
5353
name: NPM build
5454
steps:
5555
- name: Checkout
56-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
56+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5757
with:
5858
persist-credentials: false
5959

@@ -65,13 +65,19 @@ jobs:
6565
fallbackNpm: '^10'
6666

6767
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
68-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
68+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
6969
with:
7070
node-version: ${{ steps.versions.outputs.nodeVersion }}
7171

7272
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
7373
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
7474

75+
- name: Validate package-lock.json # See https://github.com/npm/cli/issues/4460
76+
run: |
77+
npm i -g npm-package-lock-add-resolved@1.1.4
78+
npm-package-lock-add-resolved
79+
git --no-pager diff --exit-code
80+
7581
- name: Install dependencies & build
7682
env:
7783
CYPRESS_INSTALL_BINARY: 0

.github/workflows/npm-audit-fix.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
steps:
3434
- name: Checkout
3535
id: checkout
36-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
36+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3737
with:
3838
persist-credentials: false
3939
ref: ${{ matrix.branches }}
@@ -47,7 +47,7 @@ jobs:
4747
fallbackNpm: '^10'
4848

4949
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
50-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
50+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
5151
with:
5252
node-version: ${{ steps.versions.outputs.nodeVersion }}
5353

@@ -68,10 +68,10 @@ jobs:
6868
6969
- name: Create Pull Request
7070
if: steps.checkout.outcome == 'success'
71-
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
71+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
7272
with:
73-
token: ${{ secrets.COMMAND_BOT_PAT }}
74-
commit-message: 'build(deps): Fix npm audit'
73+
token: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env]
74+
commit-message: 'fix(deps): Fix npm audit'
7575
committer: GitHub <noreply@github.com>
7676
author: nextcloud-command <nextcloud-command@users.noreply.github.com>
7777
signoff: true

.github/workflows/openapi.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ jobs:
2626

2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3030
with:
3131
persist-credentials: false
3232

3333
- name: Get php version
3434
id: php_versions
35-
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
35+
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
3636

3737
- name: Set up php
38-
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
38+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
3939
with:
4040
php-version: ${{ steps.php_versions.outputs.php-available }}
4141
extensions: xml
@@ -46,7 +46,7 @@ jobs:
4646

4747
- name: Check Typescript OpenApi types
4848
id: check_typescript_openapi
49-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
49+
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0
5050
with:
5151
files: "src/types/openapi/openapi*.ts"
5252

@@ -62,7 +62,7 @@ jobs:
6262

6363
- name: Set up node ${{ steps.node_versions.outputs.nodeVersion }}
6464
if: ${{ steps.node_versions.outputs.nodeVersion }}
65-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
65+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
6666
with:
6767
node-version: ${{ steps.node_versions.outputs.nodeVersion }}
6868

0 commit comments

Comments
 (0)