Skip to content

Commit c5396e6

Browse files
authored
Merge pull request #764 from nextcloud/chore/noid/workflow-update-31
[stable31] chore: update workflows
2 parents 355824c + 027463b commit c5396e6

12 files changed

+58
-11
lines changed

.github/workflows/block-merge-freeze.yml

+20-3
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,29 @@ jobs:
2929

3030
steps:
3131
- name: Register server reference to fallback to master branch
32-
run: |
33-
server_ref="$(if [ '${{ github.base_ref }}' = 'main' ]; then echo -n 'master'; else echo -n '${{ github.base_ref }}'; fi)"
34-
echo "server_ref=$server_ref" >> $GITHUB_ENV
32+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
33+
with:
34+
github-token: ${{secrets.GITHUB_TOKEN}}
35+
script: |
36+
const baseRef = context.payload.pull_request.base.ref
37+
if (baseRef === 'main' || baseRef === 'master') {
38+
core.exportVariable('server_ref', 'master');
39+
console.log('Setting server_ref to master');
40+
} else {
41+
const regex = /^stable(\d+)$/
42+
const match = baseRef.match(regex)
43+
if (match) {
44+
core.exportVariable('server_ref', match[0]);
45+
console.log('Setting server_ref to ' + match[0]);
46+
} else {
47+
console.log('Not based on master/main/stable*, so skipping freeze check');
48+
}
49+
}
3550
3651
- name: Download version.php from ${{ env.server_ref }}
52+
if: ${{ env.server_ref != '' }}
3753
run: curl 'https://raw.githubusercontent.com/nextcloud/server/${{ env.server_ref }}/version.php' --output version.php
3854

3955
- name: Run check
56+
if: ${{ env.server_ref != '' }}
4057
run: cat version.php | grep 'OC_VersionString' | grep -i -v 'RC'

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -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/phpunit-mariadb.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
matrix:
7171
php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
7272
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
73-
mariadb-versions: ['10.6', '10.11']
73+
mariadb-versions: ['10.6', '11.4']
7474

7575
name: MariaDB ${{ matrix.mariadb-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
7676

@@ -80,11 +80,12 @@ jobs:
8080
ports:
8181
- 4444:3306/tcp
8282
env:
83-
MYSQL_ROOT_PASSWORD: rootpassword
84-
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5
83+
MARIADB_ROOT_PASSWORD: rootpassword
84+
options: --health-cmd="mariadb-admin ping" --health-interval 5s --health-timeout 2s --health-retries 5
8585

8686
steps:
8787
- name: Set app env
88+
if: ${{ env.APP_NAME == '' }}
8889
run: |
8990
# Split and keep last
9091
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
@@ -111,6 +112,8 @@ jobs:
111112
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
112113
coverage: none
113114
ini-file: development
115+
# Temporary workaround for missing pcntl_* in PHP 8.3
116+
ini-values: disable_functions=
114117
env:
115118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116119

.github/workflows/phpunit-mysql.yml

+3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ jobs:
8383

8484
steps:
8585
- name: Set app env
86+
if: ${{ env.APP_NAME == '' }}
8687
run: |
8788
# Split and keep last
8889
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
@@ -109,6 +110,8 @@ jobs:
109110
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
110111
coverage: none
111112
ini-file: development
113+
# Temporary workaround for missing pcntl_* in PHP 8.3
114+
ini-values: disable_functions=
112115
env:
113116
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114117

.github/workflows/phpunit-oci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
9797
steps:
9898
- name: Set app env
99+
if: ${{ env.APP_NAME == '' }}
99100
run: |
100101
# Split and keep last
101102
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
@@ -122,6 +123,8 @@ jobs:
122123
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, oci8
123124
coverage: none
124125
ini-file: development
126+
# Temporary workaround for missing pcntl_* in PHP 8.3
127+
ini-values: disable_functions=
125128
env:
126129
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
127130

.github/workflows/phpunit-pgsql.yml

+3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ jobs:
8686

8787
steps:
8888
- name: Set app env
89+
if: ${{ env.APP_NAME == '' }}
8990
run: |
9091
# Split and keep last
9192
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
@@ -112,6 +113,8 @@ jobs:
112113
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql
113114
coverage: none
114115
ini-file: development
116+
# Temporary workaround for missing pcntl_* in PHP 8.3
117+
ini-values: disable_functions=
115118
env:
116119
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117120

.github/workflows/phpunit-sqlite.yml

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ jobs:
7575

7676
steps:
7777
- name: Set app env
78+
if: ${{ env.APP_NAME == '' }}
7879
run: |
7980
# Split and keep last
8081
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
@@ -101,6 +102,8 @@ jobs:
101102
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
102103
coverage: none
103104
ini-file: development
105+
# Temporary workaround for missing pcntl_* in PHP 8.3
106+
ini-values: disable_functions=
104107
env:
105108
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106109

.github/workflows/pr-feedback.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ on:
1515
schedule:
1616
- cron: '30 1 * * *'
1717

18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
1822
jobs:
1923
pr-feedback:
2024
if: ${{ github.repository_owner == 'nextcloud' }}
2125
runs-on: ubuntu-latest
2226
steps:
2327
- name: The get-github-handles-from-website action
24-
uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0
28+
uses: marcelklehr/get-github-handles-from-website-action@06b2239db0a48fe1484ba0bfd966a3ab81a08308 # v1.0.1
2529
id: scrape
2630
with:
2731
website: 'https://nextcloud.com/team/'
@@ -32,7 +36,7 @@ jobs:
3236
blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -)
3337
echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT"
3438
35-
- uses: marcelklehr/pr-feedback-action@1883b38a033fb16f576875e0cf45f98b857655c4
39+
- uses: nextcloud/pr-feedback-action@1883b38a033fb16f576875e0cf45f98b857655c4 # main
3640
with:
3741
feedback-message: |
3842
Hello there,

.github/workflows/psalm.yml

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ concurrency:
1414
group: psalm-${{ github.head_ref || github.run_id }}
1515
cancel-in-progress: true
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
static-analysis:
1922
runs-on: ubuntu-latest
@@ -39,6 +42,8 @@ jobs:
3942
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
4043
coverage: none
4144
ini-file: development
45+
# Temporary workaround for missing pcntl_* in PHP 8.3
46+
ini-values: disable_functions=
4247
env:
4348
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4449

.github/workflows/reuse.yml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ name: REUSE Compliance Check
1111

1212
on: [pull_request]
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
reuse-compliance-check:
1619
runs-on: ubuntu-latest

.github/workflows/update-nextcloud-ocp-approve-merge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252

5353
# Enable GitHub auto merge
5454
- name: Auto merge
55-
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # main
55+
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
5656
if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp')
5757
with:
5858
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/update-nextcloud-ocp.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ on:
1313
schedule:
1414
- cron: "5 2 * * 0"
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
update-nextcloud-ocp:
1821
runs-on: ubuntu-latest
1922

2023
strategy:
2124
fail-fast: false
2225
matrix:
23-
branches: ['main', 'master', 'stable30', 'stable29', 'stable28']
26+
branches: ['main', 'master', 'stable31', 'stable30', 'stable29']
2427

2528
name: update-nextcloud-ocp-${{ matrix.branches }}
2629

0 commit comments

Comments
 (0)