Skip to content

Commit 478b88c

Browse files
Merge pull request #285 from nextcloud/ci/noid/update-actions
ci(actions): Update workflows
2 parents fc40e14 + 3e4c982 commit 478b88c

File tree

10 files changed

+297
-21
lines changed

10 files changed

+297
-21
lines changed

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,17 @@ updates:
1010
time: "03:00"
1111
timezone: Europe/Paris
1212
open-pull-requests-limit: 10
13+
14+
# GitHub Actions
15+
- package-ecosystem: "github-actions"
16+
directory: ".github/workflows"
17+
commit-message:
18+
prefix: "ci"
19+
include: "scope"
20+
schedule:
21+
interval: weekly
22+
day: saturday
23+
time: "03:00"
24+
timezone: Europe/Berlin
25+
cooldown:
26+
default-days: 4
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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: Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: Auto approve Dependabot PRs
10+
11+
on:
12+
pull_request_target: # zizmor: ignore[dangerous-triggers]
13+
branches:
14+
- main
15+
- master
16+
- stable*
17+
18+
permissions:
19+
contents: read
20+
21+
concurrency:
22+
group: dependabot-approve-merge-${{ github.head_ref || github.run_id }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
auto-approve-merge:
27+
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'renovate[bot]'
28+
runs-on: ubuntu-latest-low
29+
permissions:
30+
# for hmarr/auto-approve-action to approve PRs
31+
pull-requests: write
32+
# for alexwilson/enable-github-automerge-action to approve PRs
33+
contents: write
34+
35+
steps:
36+
- name: Disabled on forks
37+
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
38+
run: |
39+
echo 'Can not approve PRs from forks'
40+
exit 1
41+
42+
- uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0
43+
id: branchname
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
47+
# GitHub actions bot approve
48+
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
49+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && contains(steps.branchname.outputs.branch, '/webrtc-adapter-') != true && contains(steps.branchname.outputs.branch, '/nextcloud/vue-') != true
50+
with:
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
52+
53+
# Enable GitHub auto merge
54+
- name: Auto merge
55+
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
56+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && contains(steps.branchname.outputs.branch, '/webrtc-adapter-') != true && contains(steps.branchname.outputs.branch, '/nextcloud/vue-') != true
57+
with:
58+
github-token: ${{ secrets.GITHUB_TOKEN }}

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

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

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
29+
with:
30+
persist-credentials: false
2931

30-
- name: Set up php8.2
31-
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
32+
- name: Set up php8.3
33+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
3234
with:
33-
php-version: 8.2
35+
php-version: 8.3
3436
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
3537
coverage: none
3638
ini-file: development
3739
env:
3840
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3941

4042
- name: Install dependencies
41-
run: composer i
43+
run: |
44+
composer remove nextcloud/ocp --dev --no-scripts
45+
composer i
4246
4347
- name: Lint
4448
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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,18 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
php-versions: [ '8.1' ]
25+
php-versions: ['8.1', '8.2', '8.3', '8.4', '8.5']
2626

2727
name: php-lint
2828

2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
31+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
32+
with:
33+
persist-credentials: false
3234

3335
- name: Set up php ${{ matrix.php-versions }}
34-
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
36+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
3537
with:
3638
php-version: ${{ matrix.php-versions }}
3739
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/pr-feedback.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +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:
24+
if: ${{ github.repository_owner == 'nextcloud' }}
2025
runs-on: ubuntu-latest
2126
steps:
2227
- name: The get-github-handles-from-website action
23-
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
2429
id: scrape
2530
with:
2631
website: 'https://nextcloud.com/team/'
@@ -31,7 +36,7 @@ jobs:
3136
blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -)
3237
echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT"
3338
34-
- uses: marcelklehr/pr-feedback-action@1883b38a033fb16f576875e0cf45f98b857655c4
39+
- uses: nextcloud/pr-feedback-action@f0cab224dea8e1f282f9451de322f323c78fc7a5 # main
3540
with:
3641
feedback-message: |
3742
Hello there,
@@ -45,6 +50,6 @@ jobs:
4550
4651
(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).)
4752
days-before-feedback: 14
48-
start-date: '2024-04-30'
53+
start-date: '2025-06-12'
4954
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}'
5055
exempt-bots: true

.github/workflows/reuse.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ name: REUSE Compliance Check
1111

1212
on: [pull_request]
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
reuse-compliance-check:
16-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-latest-low
1720
steps:
1821
- name: Checkout
19-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2023
with:
2124
persist-credentials: false
2225

2326
- name: REUSE Compliance Check
24-
uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275075cbddf542 # v5.0.0
27+
uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0

.github/workflows/test-repositories.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
php-versions: [ "8.1" ]
32+
php-versions: [ "8.3" ]
3333
repositories:
3434
- "nextcloud/app_template"
3535
- "nextcloud/approve_links"
@@ -50,10 +50,12 @@ jobs:
5050

5151
steps:
5252
- name: Checkout
53-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
53+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
54+
with:
55+
persist-credentials: false
5456

5557
- name: Set up php ${{ matrix.php-versions }}
56-
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
58+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
5759
with:
5860
php-version: ${{ matrix.php-versions }}
5961
coverage: none
@@ -62,8 +64,9 @@ jobs:
6264
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6365

6466
- name: Checkout repository for testing
65-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
67+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
6668
with:
69+
persist-credentials: false
6770
repository: ${{ matrix.repositories }}
6871
path: temp-repository
6972

@@ -107,7 +110,7 @@ jobs:
107110
summary:
108111
permissions:
109112
contents: none
110-
runs-on: ubuntu-latest
113+
runs-on: ubuntu-latest-low
111114
needs: openapi-repositories
112115

113116
if: always()

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ jobs:
3434

3535
steps:
3636
- name: Checkout
37-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
37+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
38+
with:
39+
persist-credentials: false
3840

3941
- name: Set up php ${{ matrix.php-versions }}
40-
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
42+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
4143
with:
4244
php-version: ${{ matrix.php-versions }}
4345
coverage: none
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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: 2023-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: Auto approve nextcloud/ocp
10+
11+
on:
12+
pull_request_target: # zizmor: ignore[dangerous-triggers]
13+
branches:
14+
- main
15+
- master
16+
- stable*
17+
18+
permissions:
19+
contents: read
20+
21+
concurrency:
22+
group: update-nextcloud-ocp-approve-merge-${{ github.head_ref || github.run_id }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
auto-approve-merge:
27+
if: github.actor == 'nextcloud-command'
28+
runs-on: ubuntu-latest-low
29+
permissions:
30+
# for hmarr/auto-approve-action to approve PRs
31+
pull-requests: write
32+
# for alexwilson/enable-github-automerge-action to approve PRs
33+
contents: write
34+
35+
steps:
36+
- name: Disabled on forks
37+
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
38+
run: |
39+
echo 'Can not approve PRs from forks'
40+
exit 1
41+
42+
- uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0
43+
id: branchname
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
47+
# GitHub actions bot approve
48+
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
49+
if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp')
50+
with:
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
52+
53+
# Enable GitHub auto merge
54+
- name: Auto merge
55+
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
56+
if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp')
57+
with:
58+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)