Skip to content

Commit 79df97e

Browse files
Merge pull request #961 from nextcloud/automated/update-workflows/default
chore: update workflows from templates
2 parents 11279b5 + b6d0d4c commit 79df97e

17 files changed

+154
-89
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3333
3434
- name: Checkout
35-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
35+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3636
with:
3737
path: ${{ env.APP_NAME }}
3838

@@ -63,7 +63,7 @@ jobs:
6363
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
6464
# Skip if no package.json
6565
if: ${{ steps.versions.outputs.npmVersion }}
66-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
66+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
6767

6868
- name: Get php version
6969
id: php-versions
@@ -72,7 +72,7 @@ jobs:
7272
filename: ${{ env.APP_NAME }}/appinfo/info.xml
7373

7474
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
75-
uses: shivammathur/setup-php@c665c7a15b5295c2488ac8a87af9cb806cd72198 # v2
75+
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
7676
with:
7777
php-version: ${{ steps.php-versions.outputs.php-min }}
7878
coverage: none
@@ -129,12 +129,12 @@ jobs:
129129
continue-on-error: true
130130
id: server-checkout
131131
run: |
132-
NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
132+
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
133133
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
134134
unzip latest-$NCVERSION.zip
135135
136136
- name: Checkout server master fallback
137-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
137+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
138138
if: ${{ steps.server-checkout.outcome != 'success' }}
139139
with:
140140
submodules: true
@@ -148,7 +148,7 @@ jobs:
148148
tar -xvf ${{ env.APP_NAME }}.tar.gz
149149
cd ../../../
150150
# Setting up keys
151-
echo "${{ secrets.APP_PRIVATE_KEY }}" > ${{ env.APP_NAME }}.key
151+
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
152152
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
153153
# Signing
154154
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 }}

.github/workflows/command-compile.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
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+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
19
name: Compile Command
210
on:
311
issue_comment:
@@ -29,7 +37,7 @@ jobs:
2937
token: ${{ secrets.COMMAND_BOT_PAT }}
3038
repository: ${{ github.event.repository.full_name }}
3139
comment-id: ${{ github.event.comment.id }}
32-
reactions: "+1"
40+
reactions: '+1'
3341

3442
- name: Parse command
3543
uses: skjnldsv/parse-command-comment@5c955203c52424151e6d0e58fb9de8a9f6a605a1 # v2
@@ -61,19 +69,19 @@ jobs:
6169
key: git-repo
6270

6371
- name: Checkout ${{ needs.init.outputs.head_ref }}
64-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
72+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
6573
with:
6674
token: ${{ secrets.COMMAND_BOT_PAT }}
6775
fetch-depth: 0
6876
ref: ${{ needs.init.outputs.head_ref }}
6977

7078
- name: Setup git
7179
run: |
72-
git config --local user.email "[email protected]"
73-
git config --local user.name "nextcloud-command"
80+
git config --local user.email '[email protected]'
81+
git config --local user.name 'nextcloud-command'
7482
7583
- name: Read package.json node and npm engines version
76-
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
84+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
7785
id: package-engines-versions
7886
with:
7987
fallbackNode: '^20'
@@ -86,13 +94,13 @@ jobs:
8694
cache: npm
8795

8896
- name: Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }}
89-
run: npm i -g npm@"${{ steps.package-engines-versions.outputs.npmVersion }}"
97+
run: npm i -g 'npm@${{ steps.package-engines-versions.outputs.npmVersion }}'
9098

9199
- name: Rebase to ${{ needs.init.outputs.base_ref }}
92100
if: ${{ contains(needs.init.outputs.arg1, 'rebase') }}
93101
run: |
94-
git fetch origin ${{ needs.init.outputs.base_ref }}:${{ needs.init.outputs.base_ref }}
95-
git rebase origin/${{ needs.init.outputs.base_ref }}
102+
git fetch origin '${{ needs.init.outputs.base_ref }}:${{ needs.init.outputs.base_ref }}'
103+
git rebase 'origin/${{ needs.init.outputs.base_ref }}'
96104
97105
- name: Install dependencies & build
98106
env:
@@ -105,30 +113,30 @@ jobs:
105113
- name: Commit default
106114
if: ${{ !contains(needs.init.outputs.arg1, 'fixup') && !contains(needs.init.outputs.arg1, 'amend') }}
107115
run: |
108-
git add ${{ github.workspace }}${{ needs.init.outputs.git_path }}
116+
git add '${{ github.workspace }}${{ needs.init.outputs.git_path }}'
109117
git commit --signoff -m 'chore(assets): Recompile assets'
110118
111119
- name: Commit fixup
112120
if: ${{ contains(needs.init.outputs.arg1, 'fixup') }}
113121
run: |
114-
git add ${{ github.workspace }}${{ needs.init.outputs.git_path }}
122+
git add '${{ github.workspace }}${{ needs.init.outputs.git_path }}'
115123
git commit --fixup=HEAD --signoff
116124
117125
- name: Commit amend
118126
if: ${{ contains(needs.init.outputs.arg1, 'amend') }}
119127
run: |
120-
git add ${{ github.workspace }}${{ needs.init.outputs.git_path }}
128+
git add '${{ github.workspace }}${{ needs.init.outputs.git_path }}'
121129
git commit --amend --no-edit --signoff
122130
# Remove any [skip ci] from the amended commit
123131
git commit --amend -m "$(git log -1 --format='%B' | sed '/\[skip ci\]/d')"
124132
125133
- name: Push normally
126134
if: ${{ !contains(needs.init.outputs.arg1, 'rebase') && !contains(needs.init.outputs.arg1, 'amend') }}
127-
run: git push origin ${{ needs.init.outputs.head_ref }}
135+
run: git push origin '${{ needs.init.outputs.head_ref }}'
128136

129137
- name: Force push
130138
if: ${{ contains(needs.init.outputs.arg1, 'rebase') || contains(needs.init.outputs.arg1, 'amend') }}
131-
run: git push --force origin ${{ needs.init.outputs.head_ref }}
139+
run: git push --force origin '${{ needs.init.outputs.head_ref }}'
132140

133141
- name: Add reaction on failure
134142
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
@@ -137,4 +145,4 @@ jobs:
137145
token: ${{ secrets.COMMAND_BOT_PAT }}
138146
repository: ${{ github.event.repository.full_name }}
139147
comment-id: ${{ github.event.comment.id }}
140-
reactions: "-1"
148+
reactions: '-1'

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Dependabot
710

@@ -21,14 +24,14 @@ concurrency:
2124

2225
jobs:
2326
auto-approve-merge:
24-
if: github.actor == 'dependabot[bot]'
27+
if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]'
2528
runs-on: ubuntu-latest-low
2629
permissions:
2730
# for hmarr/auto-approve-action to approve PRs
2831
pull-requests: write
2932

3033
steps:
31-
# Github actions bot approve
34+
# GitHub actions bot approve
3235
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
3336
with:
3437
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint-eslint.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ concurrency:
2020
jobs:
2121
changes:
2222
runs-on: ubuntu-latest-low
23+
permissions:
24+
contents: read
25+
pull-requests: read
2326

2427
outputs:
2528
src: ${{ steps.changes.outputs.src}}
@@ -53,7 +56,7 @@ jobs:
5356

5457
steps:
5558
- name: Checkout
56-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
59+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5760

5861
- name: Read package.json node and npm engines version
5962
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -68,7 +71,7 @@ jobs:
6871
node-version: ${{ steps.versions.outputs.nodeVersion }}
6972

7073
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
71-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
74+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
7275

7376
- name: Install dependencies
7477
env:

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint info.xml
710

@@ -21,7 +24,7 @@ jobs:
2124
name: info.xml lint
2225
steps:
2326
- name: Checkout
24-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2528

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

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint php-cs
710

@@ -22,14 +25,14 @@ jobs:
2225

2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2629

2730
- name: Get php version
2831
id: versions
2932
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
3033

3134
- name: Set up php${{ steps.versions.outputs.php-available }}
32-
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
35+
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
3336
with:
3437
php-version: ${{ steps.versions.outputs.php-available }}
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

.github/workflows/lint-php.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint php
710

@@ -21,7 +24,7 @@ jobs:
2124
php-versions: ${{ steps.versions.outputs.php-versions }}
2225
steps:
2326
- name: Checkout app
24-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2528
- name: Get version matrix
2629
id: versions
2730
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
@@ -37,10 +40,10 @@ jobs:
3740

3841
steps:
3942
- name: Checkout
40-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
43+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4144

4245
- name: Set up php ${{ matrix.php-versions }}
43-
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
46+
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
4447
with:
4548
php-version: ${{ matrix.php-versions }}
4649
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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint stylelint
710

@@ -22,10 +25,10 @@ jobs:
2225

2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2629

2730
- name: Read package.json node and npm engines version
28-
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
31+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
2932
id: versions
3033
with:
3134
fallbackNode: '^20'
@@ -37,7 +40,7 @@ jobs:
3740
node-version: ${{ steps.versions.outputs.nodeVersion }}
3841

3942
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
40-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
43+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
4144

4245
- name: Install dependencies
4346
env:

.github/workflows/node.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ concurrency:
2020
jobs:
2121
changes:
2222
runs-on: ubuntu-latest-low
23+
permissions:
24+
contents: read
25+
pull-requests: read
2326

2427
outputs:
2528
src: ${{ steps.changes.outputs.src}}
@@ -50,7 +53,7 @@ jobs:
5053
name: NPM build
5154
steps:
5255
- name: Checkout
53-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
56+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5457

5558
- name: Read package.json node and npm engines version
5659
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -65,7 +68,7 @@ jobs:
6568
node-version: ${{ steps.versions.outputs.nodeVersion }}
6669

6770
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
68-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
71+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
6972

7073
- name: Install dependencies & build
7174
env:

0 commit comments

Comments
 (0)