Skip to content

Commit af50859

Browse files
authored
Merge pull request #1116 from nextcloud/automated/update-workflows/default
chore: update workflows from templates
2 parents 4deec21 + ec4b1d7 commit af50859

14 files changed

+54
-17
lines changed

.github/workflows/command-compile.yml

+33-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,28 @@ jobs:
2626
base_ref: ${{ steps.comment-branch.outputs.base_ref }}
2727

2828
steps:
29+
- name: Get repository from pull request comment
30+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
31+
id: get-repository
32+
with:
33+
github-token: ${{secrets.GITHUB_TOKEN}}
34+
script: |
35+
const pull = await github.rest.pulls.get({
36+
owner: context.repo.owner,
37+
repo: context.repo.repo,
38+
pull_number: context.issue.number
39+
});
40+
41+
const repositoryName = pull.data.head?.repo?.full_name
42+
console.log(repositoryName)
43+
return repositoryName
44+
45+
- name: Disabled on forks
46+
if: ${{ fromJSON(steps.get-repository.outputs.result) != github.repository }}
47+
run: |
48+
echo 'Can not execute /compile on forks'
49+
exit 1
50+
2951
- name: Check actor permission
3052
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v2
3153
with:
@@ -57,6 +79,15 @@ jobs:
5779
uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1
5880
id: comment-branch
5981

82+
- name: Add reaction on failure
83+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
84+
if: failure()
85+
with:
86+
token: ${{ secrets.COMMAND_BOT_PAT }}
87+
repository: ${{ github.event.repository.full_name }}
88+
comment-id: ${{ github.event.comment.id }}
89+
reactions: '-1'
90+
6091
process:
6192
runs-on: ubuntu-latest
6293
needs: init
@@ -88,7 +119,7 @@ jobs:
88119
fallbackNpm: '^10'
89120

90121
- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
91-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
122+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
92123
with:
93124
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
94125
cache: npm
@@ -129,7 +160,7 @@ jobs:
129160
git commit --amend --no-edit --signoff
130161
# Remove any [skip ci] from the amended commit
131162
git commit --amend -m "$(git log -1 --format='%B' | sed '/\[skip ci\]/d')"
132-
163+
133164
- name: Push normally
134165
if: ${{ !contains(needs.init.outputs.arg1, 'rebase') && !contains(needs.init.outputs.arg1, 'amend') }}
135166
run: git push origin '${{ needs.init.outputs.head_ref }}'

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

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
pull-requests: write
3232

3333
steps:
34+
- name: Disabled on forks
35+
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
36+
run: |
37+
echo 'Can not approve PRs from forks'
38+
exit 1
39+
3440
# GitHub actions bot approve
3541
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
3642
with:

.github/workflows/lint-eslint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
fallbackNpm: '^10'
6767

6868
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
69-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
69+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
7070
with:
7171
node-version: ${{ steps.versions.outputs.nodeVersion }}
7272

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
3333

3434
- name: Set up php${{ steps.versions.outputs.php-available }}
35-
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
35+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
3636
with:
3737
php-version: ${{ steps.versions.outputs.php-available }}
3838
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4444

4545
- name: Set up php ${{ matrix.php-versions }}
46-
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
46+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
4747
with:
4848
php-version: ${{ matrix.php-versions }}
4949
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
fallbackNpm: '^10'
3636

3737
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
38-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
38+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
3939
with:
4040
node-version: ${{ steps.versions.outputs.nodeVersion }}
4141

.github/workflows/node.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
fallbackNpm: '^10'
6464

6565
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
66-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
66+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
6767
with:
6868
node-version: ${{ steps.versions.outputs.nodeVersion }}
6969

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
fallbackNpm: '^10'
4040

4141
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
42-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
42+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
4343
with:
4444
node-version: ${{ steps.versions.outputs.nodeVersion }}
4545

.github/workflows/phpunit-mysql.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
path: apps/${{ env.APP_NAME }}
9999

100100
- name: Set up php ${{ matrix.php-versions }}
101-
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
101+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
102102
with:
103103
php-version: ${{ matrix.php-versions }}
104104
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

.github/workflows/phpunit-oci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
path: apps/${{ env.APP_NAME }}
112112

113113
- name: Set up php ${{ matrix.php-versions }}
114-
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
114+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
115115
with:
116116
php-version: ${{ matrix.php-versions }}
117117
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

.github/workflows/phpunit-pgsql.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
path: apps/${{ env.APP_NAME }}
102102

103103
- name: Set up php ${{ matrix.php-versions }}
104-
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
104+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
105105
with:
106106
php-version: ${{ matrix.php-versions }}
107107
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

.github/workflows/phpunit-sqlite.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
path: apps/${{ env.APP_NAME }}
9191

9292
- name: Set up php ${{ matrix.php-versions }}
93-
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
93+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
9494
with:
9595
php-version: ${{ matrix.php-versions }}
9696
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

.github/workflows/pr-feedback.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ jobs:
4646
(If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).)
4747
days-before-feedback: 14
4848
start-date: '2024-04-30'
49-
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot'
49+
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}'
5050
exempt-bots: true

.github/workflows/reuse.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
reuse-compliance-check:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- name: Checkout
19-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
18+
- name: Checkout
19+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2020

21-
- name: REUSE Compliance Check
22-
uses: fsfe/reuse-action@3ae3c6bdf1257ab19397fab11fd3312144692083 # v4.0.0
21+
- name: REUSE Compliance Check
22+
uses: fsfe/reuse-action@3ae3c6bdf1257ab19397fab11fd3312144692083 # v4.0.0

0 commit comments

Comments
 (0)