Skip to content

Commit 9bddb83

Browse files
committed
chore: update workflows from templates
Signed-off-by: skjnldsv <[email protected]>
1 parent 3b70e8f commit 9bddb83

File tree

5 files changed

+43
-20
lines changed

5 files changed

+43
-20
lines changed

.github/workflows/appstore-build-publish.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
release:
1010
types: [published]
1111

12-
env:
13-
PHP_VERSION: 8.2
14-
1512
jobs:
1613
build_and_publish:
1714
runs-on: ubuntu-latest
@@ -56,7 +53,7 @@ jobs:
5653
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
5754
# Skip if no package.json
5855
if: ${{ steps.versions.outputs.nodeVersion }}
59-
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3
56+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
6057
with:
6158
node-version: ${{ steps.versions.outputs.nodeVersion }}
6259

@@ -65,10 +62,16 @@ jobs:
6562
if: ${{ steps.versions.outputs.npmVersion }}
6663
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
6764

68-
- name: Set up php ${{ env.PHP_VERSION }}
69-
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
65+
- name: Get php version
66+
id: php-versions
67+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
68+
with:
69+
filename: ${{ env.APP_NAME }}/appinfo/info.xml
70+
71+
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
72+
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
7073
with:
71-
php-version: ${{ env.PHP_VERSION }}
74+
php-version: ${{ steps.php-versions.outputs.php-min }}
7275
coverage: none
7376
env:
7477
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -151,7 +154,7 @@ jobs:
151154
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
152155
153156
- name: Attach tarball to github release
154-
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
157+
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
155158
id: attach_to_release
156159
with:
157160
repo_token: ${{ secrets.GITHUB_TOKEN }}

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ jobs:
2424
- name: Checkout
2525
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2626

27-
- name: Set up php8.2
28-
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
27+
- name: Get php version
28+
id: versions
29+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
30+
31+
- name: Set up php${{ steps.versions.outputs.php-available }}
32+
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
2933
with:
30-
php-version: 8.2
34+
php-version: ${{ steps.versions.outputs.php-available }}
3135
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
3236
coverage: none
3337
ini-file: development

.github/workflows/lint-php.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,23 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18+
matrix:
19+
runs-on: ubuntu-latest-low
20+
outputs:
21+
php-versions: ${{ steps.versions.outputs.php-versions }}
22+
steps:
23+
- name: Checkout app
24+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
25+
- name: Get version matrix
26+
id: versions
27+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
28+
1829
php-lint:
1930
runs-on: ubuntu-latest
31+
needs: matrix
2032
strategy:
2133
matrix:
22-
php-versions: [ '8.0', '8.1', '8.2', '8.3' ]
34+
php-versions: ${{fromJson(needs.matrix.outputs.php-versions)}}
2335

2436
name: php-lint
2537

@@ -28,7 +40,7 @@ jobs:
2840
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2941

3042
- name: Set up php ${{ matrix.php-versions }}
31-
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
43+
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
3244
with:
3345
php-version: ${{ matrix.php-versions }}
3446
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/psalm.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ jobs:
2020
- name: Checkout
2121
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2222

23-
- name: Set up php8.2
24-
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
23+
- name: Get php version
24+
id: versions
25+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
26+
27+
- name: Set up php${{ steps.versions.outputs.php-available }}
28+
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
2529
with:
26-
php-version: 8.2
30+
php-version: ${{ steps.versions.outputs.php-available }}
2731
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
2832
coverage: none
2933
ini-file: development

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- name: Set up php8.2
3333
if: steps.checkout.outcome == 'success'
34-
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
34+
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
3535
with:
3636
php-version: 8.2
3737
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -57,7 +57,7 @@ jobs:
5757
run: composer require --dev nextcloud/ocp:dev-${{ matrix.branches }}
5858

5959
- name: Raise on issue on failure
60-
uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1
60+
uses: dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0
6161
if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_branch.conclusion == 'failure' }}
6262
with:
6363
token: ${{ secrets.GITHUB_TOKEN }}
@@ -70,7 +70,7 @@ jobs:
7070
run: composer require --dev nextcloud/ocp:dev-master
7171

7272
- name: Raise on issue on failure
73-
uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1
73+
uses: dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0
7474
if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_main.conclusion == 'failure' }}
7575
with:
7676
token: ${{ secrets.GITHUB_TOKEN }}
@@ -100,7 +100,7 @@ jobs:
100100

101101
- name: Create Pull Request
102102
if: steps.checkout.outcome == 'success'
103-
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v3
103+
uses: peter-evans/create-pull-request@a4f52f8033a6168103c2538976c07b467e8163bc # v6.0.1
104104
with:
105105
token: ${{ secrets.COMMAND_BOT_PAT }}
106106
commit-message: "chore(dev-deps): Bump nextcloud/ocp package"

0 commit comments

Comments
 (0)