Skip to content

Commit 5e83238

Browse files
committed
ci: Update actions
Signed-off-by: Joas Schilling <[email protected]>
1 parent d02eeb5 commit 5e83238

20 files changed

+147
-51
lines changed

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

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
release:
1313
types: [published]
1414

15+
permissions:
16+
contents: write
17+
1518
jobs:
1619
build_and_publish:
1720
runs-on: ubuntu-latest
@@ -32,10 +35,22 @@ jobs:
3235
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3336
3437
- name: Checkout
35-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
38+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3639
with:
40+
persist-credentials: false
3741
path: ${{ env.APP_NAME }}
3842

43+
- name: Get app version number
44+
id: app-version
45+
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
46+
with:
47+
filename: ${{ env.APP_NAME }}/appinfo/info.xml
48+
expression: "//info//version/text()"
49+
50+
- name: Validate app version against tag
51+
run: |
52+
[ "${{ env.APP_VERSION }}" = "v${{ fromJSON(steps.app-version.outputs.result).version }}" ]
53+
3954
- name: Get appinfo data
4055
id: appinfo
4156
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
@@ -56,7 +71,7 @@ jobs:
5671
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
5772
# Skip if no package.json
5873
if: ${{ steps.versions.outputs.nodeVersion }}
59-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
74+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
6075
with:
6176
node-version: ${{ steps.versions.outputs.nodeVersion }}
6277

@@ -134,9 +149,10 @@ jobs:
134149
unzip latest-$NCVERSION.zip
135150
136151
- name: Checkout server master fallback
137-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
152+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
138153
if: ${{ steps.server-checkout.outcome != 'success' }}
139154
with:
155+
persist-credentials: false
140156
submodules: true
141157
repository: nextcloud/server
142158
path: nextcloud

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727

2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
with:
32+
persist-credentials: false
3133

3234
- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7 # v1.3.0
3335
with:

.github/workflows/command-openapi.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
issue_comment:
1212
types: [created]
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
init:
1619
runs-on: ubuntu-latest
@@ -100,8 +103,9 @@ jobs:
100103
key: git-repo
101104

102105
- name: Checkout ${{ needs.init.outputs.head_ref }}
103-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
106+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
104107
with:
108+
persist-credentials: false
105109
token: ${{ secrets.COMMAND_BOT_PAT }}
106110
fetch-depth: 0
107111
ref: ${{ needs.init.outputs.head_ref }}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
name: Dependabot
1010

1111
on:
12-
pull_request_target:
12+
pull_request_target: # zizmor: ignore[dangerous-triggers]
1313
branches:
1414
- main
1515
- master
@@ -24,7 +24,7 @@ concurrency:
2424

2525
jobs:
2626
auto-approve-merge:
27-
if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]'
27+
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'renovate[bot]'
2828
runs-on: ubuntu-latest-low
2929
permissions:
3030
# for hmarr/auto-approve-action to approve PRs

.github/workflows/lint-eslint.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ jobs:
5656

5757
steps:
5858
- name: Checkout
59-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
59+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
60+
with:
61+
persist-credentials: false
6062

6163
- name: Read package.json node and npm engines version
6264
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -66,7 +68,7 @@ jobs:
6668
fallbackNpm: '^10'
6769

6870
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
69-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
71+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
7072
with:
7173
node-version: ${{ steps.versions.outputs.nodeVersion }}
7274

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
name: info.xml lint
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
2830

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

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,28 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
persist-credentials: false
2931

3032
- name: Get php version
3133
id: versions
3234
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
3335

34-
- name: Set up php${{ steps.versions.outputs.php-available }}
36+
- name: Set up php${{ steps.versions.outputs.php-min }}
3537
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
3638
with:
37-
php-version: ${{ steps.versions.outputs.php-available }}
39+
php-version: ${{ steps.versions.outputs.php-min }}
3840
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
3941
coverage: none
4042
ini-file: development
4143
env:
4244
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4345

4446
- name: Install dependencies
45-
run: composer i
47+
run: |
48+
composer remove nextcloud/ocp --dev
49+
composer i
4650
4751
- name: Lint
48-
run: PHP_CS_FIXER_IGNORE_ENV=1 composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
52+
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: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ jobs:
2424
php-versions: ${{ steps.versions.outputs.php-versions }}
2525
steps:
2626
- name: Checkout app
27-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
30+
2831
- name: Get version matrix
2932
id: versions
3033
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
@@ -40,7 +43,9 @@ jobs:
4043

4144
steps:
4245
- name: Checkout
43-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
46+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
47+
with:
48+
persist-credentials: false
4449

4550
- name: Set up php ${{ matrix.php-versions }}
4651
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1

.github/workflows/lint-stylelint.yml

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

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
persist-credentials: false
2931

3032
- name: Read package.json node and npm engines version
3133
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -35,7 +37,7 @@ jobs:
3537
fallbackNpm: '^10'
3638

3739
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
38-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
40+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
3941
with:
4042
node-version: ${{ steps.versions.outputs.nodeVersion }}
4143

.github/workflows/node.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ jobs:
5353
name: NPM build
5454
steps:
5555
- name: Checkout
56-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
56+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
57+
with:
58+
persist-credentials: false
5759

5860
- name: Read package.json node and npm engines version
5961
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -63,7 +65,7 @@ jobs:
6365
fallbackNpm: '^10'
6466

6567
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
66-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
68+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
6769
with:
6870
node-version: ${{ steps.versions.outputs.nodeVersion }}
6971

0 commit comments

Comments
 (0)