Skip to content

Commit cf16479

Browse files
authored
Merge pull request #5173 from nextcloud/revert-5167-automated/update-workflows/stable28
Revert "chore: update workflows from templates"
2 parents f3926ab + e201e26 commit cf16479

15 files changed

+199
-300
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ jobs:
2525
runs-on: ubuntu-latest
2626

2727
steps:
28-
- name: Download version.php from ${{ github.base_ref }}
29-
run: curl https://raw.githubusercontent.com/nextcloud/server/${{ github.base_ref }}/version.php --output version.php
28+
- name: Register text Git reference
29+
run: |
30+
server_ref="$(if [ "${{ github.base_ref }}" = "main" ]; then echo -n "master"; else echo -n "${{ github.base_ref }}"; fi)"
31+
echo "server_ref=$server_ref" >> $GITHUB_ENV
32+
- name: Download version.php from ${{ env.server_ref }}
33+
run: curl https://raw.githubusercontent.com/nextcloud/server/${{ env.server_ref }}/version.php --output version.php
3034

3135
- name: Run check
3236
run: cat version.php | grep 'OC_VersionString' | grep -i -v 'RC'

.github/workflows/command-compile.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
require: write
2424

2525
- name: Add reaction on start
26-
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
26+
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3.0.2
2727
with:
2828
token: ${{ secrets.COMMAND_BOT_PAT }}
2929
repository: ${{ github.event.repository.full_name }}
@@ -39,9 +39,9 @@ jobs:
3939
id: git-path
4040
run: |
4141
if ${{ startsWith(steps.command.outputs.arg1, '/') }}; then
42-
echo "path=${{ github.workspace }}${{steps.command.outputs.arg1}}" >> $GITHUB_OUTPUT
42+
echo "path=${{steps.command.outputs.arg1}}" >> $GITHUB_OUTPUT
4343
else
44-
echo "path=${{ github.workspace }}${{steps.command.outputs.arg2}}" >> $GITHUB_OUTPUT
44+
echo "path=${{steps.command.outputs.arg2}}" >> $GITHUB_OUTPUT
4545
fi
4646
4747
- name: Init branch
@@ -54,13 +54,13 @@ jobs:
5454

5555
steps:
5656
- name: Restore cached git repository
57-
uses: buildjet/cache@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
57+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
5858
with:
5959
path: .git
6060
key: git-repo
6161

6262
- name: Checkout ${{ needs.init.outputs.head_ref }}
63-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
63+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
6464
with:
6565
token: ${{ secrets.COMMAND_BOT_PAT }}
6666
fetch-depth: 0
@@ -79,7 +79,7 @@ jobs:
7979
fallbackNpm: '^9'
8080

8181
- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
82-
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
82+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
8383
with:
8484
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
8585
cache: npm
@@ -88,17 +88,14 @@ jobs:
8888
run: npm i -g npm@"${{ steps.package-engines-versions.outputs.npmVersion }}"
8989

9090
- name: Install dependencies & build
91-
env:
92-
CYPRESS_INSTALL_BINARY: 0
93-
PUPPETEER_SKIP_DOWNLOAD: true
9491
run: |
9592
npm ci
9693
npm run build --if-present
9794
9895
- name: Commit and push default
9996
if: ${{ needs.init.outputs.arg1 != 'fixup' && needs.init.outputs.arg1 != 'amend' }}
10097
run: |
101-
git add ${{ needs.init.outputs.git_path }}
98+
git add ${{ github.workspace }}${{ needs.init.outputs.git_path }}
10299
git commit --signoff -m 'chore(assets): Recompile assets'
103100
git push origin ${{ needs.init.outputs.head_ref }}
104101
@@ -117,7 +114,7 @@ jobs:
117114
git push --force origin ${{ needs.init.outputs.head_ref }}
118115
119116
- name: Add reaction on failure
120-
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
117+
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3.0.2
121118
if: failure()
122119
with:
123120
token: ${{ secrets.COMMAND_BOT_PAT }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121

2222
jobs:
2323
auto-approve-merge:
24-
if: github.actor == 'dependabot[bot]'
24+
if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]'
2525
runs-on: ubuntu-latest
2626
permissions:
2727
# for hmarr/auto-approve-action to approve PRs

.github/workflows/lint-eslint.yml

Lines changed: 17 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,20 @@
88

99
name: Lint eslint
1010

11-
on: pull_request
11+
on:
12+
pull_request:
13+
paths:
14+
- '.github/workflows/**'
15+
- 'src/**'
16+
- 'appinfo/info.xml'
17+
- 'package.json'
18+
- 'package-lock.json'
19+
- 'tsconfig.json'
20+
- '.eslintrc.*'
21+
- '.eslintignore'
22+
- '**.js'
23+
- '**.ts'
24+
- '**.vue'
1225

1326
permissions:
1427
contents: read
@@ -18,42 +31,14 @@ concurrency:
1831
cancel-in-progress: true
1932

2033
jobs:
21-
changes:
22-
runs-on: ubuntu-latest
23-
24-
outputs:
25-
src: ${{ steps.changes.outputs.src}}
26-
27-
steps:
28-
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
29-
id: changes
30-
continue-on-error: true
31-
with:
32-
filters: |
33-
src:
34-
- '.github/workflows/**'
35-
- 'src/**'
36-
- 'appinfo/info.xml'
37-
- 'package.json'
38-
- 'package-lock.json'
39-
- 'tsconfig.json'
40-
- '.eslintrc.*'
41-
- '.eslintignore'
42-
- '**.js'
43-
- '**.ts'
44-
- '**.vue'
45-
4634
lint:
4735
runs-on: ubuntu-latest
4836

49-
needs: changes
50-
if: needs.changes.outputs.src != 'false'
51-
52-
name: NPM lint
37+
name: eslint
5338

5439
steps:
5540
- name: Checkout
56-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
41+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
5742

5843
- name: Read package.json node and npm engines version
5944
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
@@ -63,33 +48,15 @@ jobs:
6348
fallbackNpm: '^9'
6449

6550
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
66-
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
51+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
6752
with:
6853
node-version: ${{ steps.versions.outputs.nodeVersion }}
6954

7055
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
7156
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
7257

7358
- name: Install dependencies
74-
env:
75-
CYPRESS_INSTALL_BINARY: 0
76-
PUPPETEER_SKIP_DOWNLOAD: true
7759
run: npm ci
7860

7961
- name: Lint
8062
run: npm run lint
81-
82-
summary:
83-
permissions:
84-
contents: none
85-
runs-on: ubuntu-latest
86-
needs: [changes, lint]
87-
88-
if: always()
89-
90-
# This is the summary, we just avoid to rename it so that branch protection rules still match
91-
name: eslint
92-
93-
steps:
94-
- name: Summary status
95-
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
25+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
2626

27-
- name: Set up php8.2
28-
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
27+
- name: Set up php
28+
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
2929
with:
30-
php-version: 8.2
30+
php-version: 8.1
3131
coverage: none
3232
ini-file: development
3333
env:

.github/workflows/lint-php.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55

66
name: Lint php
77

8-
on: pull_request
8+
on:
9+
pull_request:
10+
push:
11+
branches:
12+
- main
13+
- master
14+
- stable*
915

1016
permissions:
1117
contents: read
@@ -19,16 +25,16 @@ jobs:
1925
runs-on: ubuntu-latest
2026
strategy:
2127
matrix:
22-
php-versions: [ '8.0', '8.1', '8.2', '8.3' ]
28+
php-versions: [ "8.0", "8.1", "8.2", "8.3" ]
2329

2430
name: php-lint
2531

2632
steps:
2733
- name: Checkout
28-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
34+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
2935

3036
- name: Set up php ${{ matrix.php-versions }}
31-
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
37+
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
3238
with:
3339
php-version: ${{ matrix.php-versions }}
3440
coverage: none

.github/workflows/lint-stylelint.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
25+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
2626

2727
- name: Read package.json node and npm engines version
2828
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
@@ -32,16 +32,14 @@ jobs:
3232
fallbackNpm: '^9'
3333

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

3939
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
4040
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
4141

4242
- name: Install dependencies
43-
env:
44-
CYPRESS_INSTALL_BINARY: 0
4543
run: npm ci
4644

4745
- name: Lint

.github/workflows/node.yml

Lines changed: 27 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,23 @@
55

66
name: Node
77

8-
on: pull_request
8+
on:
9+
pull_request:
10+
paths:
11+
- '.github/workflows/**'
12+
- 'src/**'
13+
- 'appinfo/info.xml'
14+
- 'package.json'
15+
- 'package-lock.json'
16+
- 'tsconfig.json'
17+
- '**.js'
18+
- '**.ts'
19+
- '**.vue'
20+
push:
21+
branches:
22+
- main
23+
- master
24+
- stable*
925

1026
permissions:
1127
contents: read
@@ -15,39 +31,13 @@ concurrency:
1531
cancel-in-progress: true
1632

1733
jobs:
18-
changes:
19-
runs-on: ubuntu-latest
20-
21-
outputs:
22-
src: ${{ steps.changes.outputs.src}}
23-
24-
steps:
25-
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
26-
id: changes
27-
continue-on-error: true
28-
with:
29-
filters: |
30-
src:
31-
- '.github/workflows/**'
32-
- 'src/**'
33-
- 'appinfo/info.xml'
34-
- 'package.json'
35-
- 'package-lock.json'
36-
- 'tsconfig.json'
37-
- '**.js'
38-
- '**.ts'
39-
- '**.vue'
40-
4134
build:
4235
runs-on: ubuntu-latest
4336

44-
needs: changes
45-
if: needs.changes.outputs.src != 'false'
46-
47-
name: NPM build
37+
name: node
4838
steps:
4939
- name: Checkout
50-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
40+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
5141

5242
- name: Read package.json node and npm engines version
5343
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
@@ -57,43 +47,22 @@ jobs:
5747
fallbackNpm: '^9'
5848

5949
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
60-
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
50+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
6151
with:
6252
node-version: ${{ steps.versions.outputs.nodeVersion }}
6353

6454
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
6555
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
6656

6757
- name: Install dependencies & build
68-
env:
69-
CYPRESS_INSTALL_BINARY: 0
70-
PUPPETEER_SKIP_DOWNLOAD: true
7158
run: |
7259
npm ci
7360
npm run build --if-present
61+
npm run stats --if-present
7462
75-
- name: Check webpack build changes
76-
run: |
77-
bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)"
78-
79-
- name: Show changes on failure
80-
if: failure()
81-
run: |
82-
git status
83-
git --no-pager diff
84-
exit 1 # make it red to grab attention
85-
86-
summary:
87-
permissions:
88-
contents: none
89-
runs-on: ubuntu-latest
90-
needs: [changes, build]
91-
92-
if: always()
93-
94-
# This is the summary, we just avoid to rename it so that branch protection rules still match
95-
name: node
96-
97-
steps:
98-
- name: Summary status
99-
run: if ${{ needs.changes.outputs.src != 'false' && needs.build.result != 'success' }}; then exit 1; fi
63+
- name: Send bundle stats to RelativeCI
64+
uses: relative-ci/agent-action@e92b0c712e5ad0a039faf1026cbe438b8e7fed16 # v2
65+
with:
66+
webpackStatsFile: ./webpack-stats.json
67+
key: ${{ secrets.RELATIVE_CI_KEY }}
68+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)