Skip to content

Commit 7952129

Browse files
chore: update workflows from templates
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
1 parent eee606f commit 7952129

17 files changed

+138
-75
lines changed

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: Pull request checks
6+
name: Block merges for EOL
77

88
on: pull_request
99

10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: block-merge-eol-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1017
jobs:
1118
block-merges-eol:
1219
name: Block merges for EOL branches
@@ -24,7 +31,7 @@ jobs:
2431
# retrieve version number from branch reference
2532
server_major=$(echo "${{ github.base_ref }}" | sed -En 's/stable//p')
2633
echo "server_major=$server_major" >> $GITHUB_ENV
27-
34+
2835
- name: Checking if ${{ env.server_major }} is EOL
2936
run: |
30-
php -r 'echo json_encode(require_once "config.php");' | jq --arg version "${{ env.server_major }}" '.stable[$version]["100"].eol' | grep --silent -i 'false'
37+
php -r 'echo json_encode(require_once "config.php");' | jq --arg version "${{ env.server_major }}" '.stable[$version]["100"].eol // .beta[$version]["100"].eol' | grep --silent -i 'false'

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,25 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: Pull request checks
6+
name: Block merges during freezes
77

8-
on: pull_request
8+
on:
9+
pull_request:
10+
types: [opened, ready_for_review, reopened, synchronize]
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
group: block-merge-freeze-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
918

1019
jobs:
1120
block-merges-during-freeze:
1221
name: Block merges during freezes
1322

23+
if: github.event.pull_request.draft == false
24+
1425
runs-on: ubuntu-latest
1526

1627
steps:

.github/workflows/command-compile.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ jobs:
1818

1919
steps:
2020
- name: Check actor permission
21-
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1
21+
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2
2222
with:
2323
require: write
2424

2525
- name: Add reaction on start
26-
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 # v2.1.0
26+
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
2727
with:
2828
token: ${{ secrets.COMMAND_BOT_PAT }}
2929
repository: ${{ github.event.repository.full_name }}
3030
comment-id: ${{ github.event.comment.id }}
31-
reaction-type: "+1"
31+
reactions: "+1"
3232

3333
- name: Parse command
34-
uses: skjnldsv/parse-command-comment@e9cb9d1df338afed4295a59bbe27b4da53fd38a8 # master
34+
uses: skjnldsv/parse-command-comment@7cef1df370a99dfd5bf896d50121390c96785db8 # v2
3535
id: command
3636

3737
# Init path depending on which command is run
@@ -45,7 +45,7 @@ jobs:
4545
fi
4646
4747
- name: Init branch
48-
uses: xt0rted/pull-request-comment-branch@653a7d5ca8bd91d3c5cb83286063314d0b063b8e # v1
48+
uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1
4949
id: comment-branch
5050

5151
process:
@@ -54,7 +54,7 @@ jobs:
5454

5555
steps:
5656
- name: Checkout ${{ needs.init.outputs.head_ref }}
57-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
57+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
5858
with:
5959
token: ${{ secrets.COMMAND_BOT_PAT }}
6060
fetch-depth: 0
@@ -66,14 +66,14 @@ jobs:
6666
git config --local user.name "nextcloud-command"
6767
6868
- name: Read package.json node and npm engines version
69-
uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
69+
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
7070
id: package-engines-versions
7171
with:
7272
fallbackNode: '^16'
7373
fallbackNpm: '^7'
7474

7575
- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
76-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
76+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
7777
with:
7878
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
7979
cache: npm
@@ -90,7 +90,7 @@ jobs:
9090
if: ${{ needs.init.outputs.arg1 != 'fixup' && needs.init.outputs.arg1 != 'amend' }}
9191
run: |
9292
git add ${{ needs.init.outputs.git_path }}
93-
git commit --signoff -m 'Compile assets'
93+
git commit --signoff -m 'chore(assets): Recompile assets'
9494
git push origin ${{ needs.init.outputs.head_ref }}
9595
9696
- name: Commit and push fixup
@@ -108,10 +108,10 @@ jobs:
108108
git push --force origin ${{ needs.init.outputs.head_ref }}
109109
110110
- name: Add reaction on failure
111-
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 # v2.1.0
111+
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
112112
if: failure()
113113
with:
114114
token: ${{ secrets.COMMAND_BOT_PAT }}
115115
repository: ${{ github.event.repository.full_name }}
116116
comment-id: ${{ github.event.comment.id }}
117-
reaction-type: "-1"
117+
reactions: "-1"

.github/workflows/command-rebase.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,26 @@ jobs:
2323

2424
steps:
2525
- name: Add reaction on start
26-
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 # v2.1.0
26+
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
2727
with:
2828
token: ${{ secrets.COMMAND_BOT_PAT }}
2929
repository: ${{ github.event.repository.full_name }}
3030
comment-id: ${{ github.event.comment.id }}
3131
reaction-type: "+1"
3232

3333
- name: Checkout the latest code
34-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
34+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3535
with:
3636
fetch-depth: 0
3737
token: ${{ secrets.COMMAND_BOT_PAT }}
3838

3939
- name: Automatic Rebase
40-
uses: cirrus-actions/rebase@6e572f08c244e2f04f9beb85a943eb618218714d # 1.7
40+
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
4343

4444
- name: Add reaction on failure
45-
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 # v2.1.0
45+
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
4646
if: failure()
4747
with:
4848
token: ${{ secrets.COMMAND_BOT_PAT }}

.github/workflows/fixup.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: Pull request checks
6+
name: Block fixup and squash commits
77

88
on:
99
pull_request:
10-
types: [opened, ready_for_review, reopened]
10+
types: [opened, ready_for_review, reopened, synchronize]
1111

1212
permissions:
1313
contents: read
@@ -28,6 +28,6 @@ jobs:
2828

2929
steps:
3030
- name: Run check
31-
uses: xt0rted/block-autosquash-commits-action@79880c36b4811fe549cfffe20233df88876024e7 # v2
31+
uses: skjnldsv/block-fixup-merge-action@42d26e1b536ce61e5cf467d65fb76caf4aa85acf # v1
3232
with:
3333
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint-eslint-when-unrelated.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions
77
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
88

9-
name: Lint
9+
name: Lint eslint
1010

1111
on:
1212
pull_request:

.github/workflows/lint-eslint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions
77
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
88

9-
name: Lint
9+
name: Lint eslint
1010

1111
on:
1212
pull_request:
@@ -38,17 +38,17 @@ jobs:
3838

3939
steps:
4040
- name: Checkout
41-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
41+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
4242

4343
- name: Read package.json node and npm engines version
44-
uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
44+
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
4545
id: versions
4646
with:
4747
fallbackNode: '^16'
4848
fallbackNpm: '^7'
4949

5050
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
51-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
51+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
5252
with:
5353
node-version: ${{ steps.versions.outputs.nodeVersion }}
5454

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: Lint
6+
name: Lint php-cs
77

88
on: pull_request
99

@@ -22,13 +22,14 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
25+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
2626

2727
- name: Set up php
28-
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
28+
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
2929
with:
3030
php-version: 8.1
3131
coverage: none
32+
ini-file: development
3233
env:
3334
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3435

.github/workflows/lint-php.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: Lint
6+
name: Lint php
77

88
on:
99
pull_request:
@@ -31,13 +31,14 @@ jobs:
3131

3232
steps:
3333
- name: Checkout
34-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
34+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3535

3636
- name: Set up php ${{ matrix.php-versions }}
37-
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
37+
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
3838
with:
3939
php-version: ${{ matrix.php-versions }}
4040
coverage: none
41+
ini-file: development
4142
env:
4243
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4344

.github/workflows/lint-stylelint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: Lint
6+
name: Lint stylelint
77

88
on: pull_request
99

@@ -22,17 +22,17 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
25+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
2626

2727
- name: Read package.json node and npm engines version
28-
uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
28+
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
2929
id: versions
3030
with:
3131
fallbackNode: '^16'
3232
fallbackNpm: '^7'
3333

3434
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
35-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
35+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
3636
with:
3737
node-version: ${{ steps.versions.outputs.nodeVersion }}
3838

0 commit comments

Comments
 (0)