summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-01-05 06:50:40 +0100
committerJoas Schilling <coding@schilljs.com>2023-01-05 10:08:29 +0100
commit4e696622e7a5c9e8c7aa43f2dbf3d00181848387 (patch)
tree411b834f9790702a9f82fd3d053c20e60fb0e921
parent351f65884384431a0492d3aa3a06eec94f713085 (diff)
chore(CI): Bump action templates to latest versions
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--.github/workflows/appstore-build-publish.yml26
-rw-r--r--.github/workflows/dependabot-approve.yml34
-rw-r--r--.github/workflows/lint-eslint.yml19
-rw-r--r--.github/workflows/lint-info-xml.yml12
-rw-r--r--.github/workflows/lint-php-cs.yml8
-rw-r--r--.github/workflows/lint-php.yml16
-rw-r--r--.github/workflows/lint-stylelint.yml12
-rw-r--r--.github/workflows/node.yml16
-rw-r--r--.github/workflows/phpunit-mysql.yml14
-rw-r--r--.github/workflows/phpunit-oci.yml14
-rw-r--r--.github/workflows/phpunit-pgsql.yml14
-rw-r--r--.github/workflows/phpunit-sqlite.yml14
-rw-r--r--.github/workflows/psalm.yml16
-rw-r--r--.github/workflows/update-nextcloud-ocp.yml2
14 files changed, 149 insertions, 68 deletions
diff --git a/.github/workflows/appstore-build-publish.yml b/.github/workflows/appstore-build-publish.yml
index 286d5d333..9f61bcb4c 100644
--- a/.github/workflows/appstore-build-publish.yml
+++ b/.github/workflows/appstore-build-publish.yml
@@ -10,7 +10,7 @@ on:
types: [published]
env:
- PHP_VERSION: 8.0
+ PHP_VERSION: 8.1
jobs:
build_and_publish:
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Check actor permission
- uses: skjnldsv/check-actor-permission@v2
+ uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1
with:
require: write
@@ -32,19 +32,19 @@ jobs:
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
with:
path: ${{ env.APP_NAME }}
- name: Get appinfo data
id: appinfo
- uses: skjnldsv/xpath-action@master
+ uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
with:
filename: ${{ env.APP_NAME }}/appinfo/info.xml
expression: "//info//dependencies//nextcloud/@min-version"
- name: Read package.json node and npm engines version
- uses: skjnldsv/read-package-engines-version-actions@v1.2
+ uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
id: versions
# Continue if no package.json
continue-on-error: true
@@ -56,7 +56,7 @@ jobs:
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
# Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
- uses: actions/setup-node@v3
+ uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
@@ -66,14 +66,16 @@ jobs:
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
- name: Set up php ${{ env.PHP_VERSION }}
- uses: shivammathur/setup-php@v2
+ uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check composer.json
id: check_composer
- uses: andstor/file-existence-action@v1
+ uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: "${{ env.APP_NAME }}/composer.json"
@@ -93,7 +95,7 @@ jobs:
- name: Check Krankerl config
id: krankerl
- uses: andstor/file-existence-action@v1
+ uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: ${{ env.APP_NAME }}/krankerl.toml
@@ -124,7 +126,7 @@ jobs:
unzip latest-$NCVERSION.zip
- name: Checkout server master fallback
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
if: ${{ steps.server-checkout.outcome != 'success' }}
with:
repository: nextcloud/server
@@ -146,7 +148,7 @@ jobs:
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
- name: Attach tarball to github release
- uses: svenstaro/upload-release-action@v2
+ uses: svenstaro/upload-release-action@133984371c30d34e38222a64855679a414cb7575 # v2
id: attach_to_release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
@@ -156,7 +158,7 @@ jobs:
overwrite: true
- name: Upload app to Nextcloud appstore
- uses: nextcloud-releases/nextcloud-appstore-push-action@v1
+ uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
with:
app_name: ${{ env.APP_NAME }}
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
diff --git a/.github/workflows/dependabot-approve.yml b/.github/workflows/dependabot-approve.yml
index 903e2d88b..7f6b10ab7 100644
--- a/.github/workflows/dependabot-approve.yml
+++ b/.github/workflows/dependabot-approve.yml
@@ -1,12 +1,34 @@
-name: Dependabot auto approve
-on: pull_request_target
+# This workflow is provided via the organization template repository
+#
+# https://github.com/nextcloud/.github
+# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
+
+name: Dependabot
+
+on:
+ pull_request_target:
+ branches:
+ - main
+ - master
+ - stable*
+
+permissions:
+ contents: read
+
+concurrency:
+ group: dependabot-approve-merge-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
jobs:
- auto-merge:
+ auto-approve:
+ if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
+ permissions:
+ # for hmarr/auto-approve-action to approve PRs
+ pull-requests: write
+
steps:
- # Default github action approve
- - uses: hmarr/auto-approve-action@v2.0.0
- if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
+ # GitHub actions bot approve
+ - uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml
index 687467783..80ec2445e 100644
--- a/.github/workflows/lint-eslint.yml
+++ b/.github/workflows/lint-eslint.yml
@@ -5,7 +5,18 @@
name: Lint
-on: pull_request
+on:
+ pull_request:
+ paths:
+ - '.github/workflows/**'
+ - 'src/**'
+ - 'appinfo/info.xml'
+ - 'package.json'
+ - 'package-lock.json'
+ - 'tsconfig.json'
+ - '**.js'
+ - '**.ts'
+ - '**.vue'
permissions:
contents: read
@@ -22,17 +33,17 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
- name: Read package.json node and npm engines version
- uses: skjnldsv/read-package-engines-version-actions@v1.2
+ uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
- uses: actions/setup-node@v3
+ uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
diff --git a/.github/workflows/lint-info-xml.yml b/.github/workflows/lint-info-xml.yml
index 726b7f6ad..c5f57dd5e 100644
--- a/.github/workflows/lint-info-xml.yml
+++ b/.github/workflows/lint-info-xml.yml
@@ -7,6 +7,14 @@ name: Lint
on:
pull_request:
+ push:
+ branches:
+ - main
+ - master
+ - stable*
+
+permissions:
+ contents: read
concurrency:
group: lint-info-xml-${{ github.head_ref || github.run_id }}
@@ -19,13 +27,13 @@ jobs:
name: info.xml lint
steps:
- name: Checkout
- uses: actions/checkout@master
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
- name: Download schema
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
- name: Lint info.xml
- uses: ChristophWurst/xmllint-action@v1
+ uses: ChristophWurst/xmllint-action@d18a551aab4728e4af449617638600634d7a48cb # v1
with:
xml-file: ./appinfo/info.xml
xml-schema-file: ./info.xsd
diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml
index af585a80c..85cb03664 100644
--- a/.github/workflows/lint-php-cs.yml
+++ b/.github/workflows/lint-php-cs.yml
@@ -22,13 +22,15 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
- name: Set up php
- uses: shivammathur/setup-php@v2
+ uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
with:
- php-version: 8.0
+ php-version: 8.1
coverage: none
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: composer i
diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml
index a4cd5ec75..5a7cbffb0 100644
--- a/.github/workflows/lint-php.yml
+++ b/.github/workflows/lint-php.yml
@@ -5,7 +5,13 @@
name: Lint
-on: pull_request
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+ - master
+ - stable*
permissions:
contents: read
@@ -19,19 +25,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- php-versions: ['8.0', '8.1', '8.2']
+ php-versions: [ "8.0", "8.1", "8.2" ]
name: php-lint
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
- name: Set up php ${{ matrix.php-versions }}
- uses: shivammathur/setup-php@v2
+ uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: composer run lint
diff --git a/.github/workflows/lint-stylelint.yml b/.github/workflows/lint-stylelint.yml
index 62909e43c..a035b1765 100644
--- a/.github/workflows/lint-stylelint.yml
+++ b/.github/workflows/lint-stylelint.yml
@@ -5,8 +5,10 @@
name: Lint
-on:
- pull_request:
+on: pull_request
+
+permissions:
+ contents: read
concurrency:
group: lint-stylelint-${{ github.head_ref || github.run_id }}
@@ -20,17 +22,17 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
- name: Read package.json node and npm engines version
- uses: skjnldsv/read-package-engines-version-actions@v1.1
+ uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
- uses: actions/setup-node@v2
+ uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml
index 3c91e598d..f0db34e83 100644
--- a/.github/workflows/node.yml
+++ b/.github/workflows/node.yml
@@ -15,6 +15,13 @@ on:
- 'package-lock.json'
- 'tsconfig.json'
- '**.js'
+ - '**.ts'
+ - '**.vue'
+ push:
+ branches:
+ - main
+ - master
+ - stable*
permissions:
contents: read
@@ -30,17 +37,17 @@ jobs:
name: node
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
- name: Read package.json node and npm engines version
- uses: skjnldsv/read-package-engines-version-actions@v1.2
+ uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
- uses: actions/setup-node@v3
+ uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
@@ -54,10 +61,11 @@ jobs:
- name: Check webpack build changes
run: |
- bash -c "[[ ! \"`git status --porcelain `\" ]] || exit 1"
+ bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)"
- name: Show changes on failure
if: failure()
run: |
git status
git --no-pager diff
+ exit 1 # make it red to grab attention
diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml
index fea904893..a30adf5b5 100644
--- a/.github/workflows/phpunit-mysql.yml
+++ b/.github/workflows/phpunit-mysql.yml
@@ -67,27 +67,29 @@ jobs:
echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
- name: Checkout server
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}
- name: Checkout app
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
with:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
- uses: shivammathur/setup-php@v2
+ uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql
coverage: none
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check composer file existence
id: check_composer
- uses: andstor/file-existence-action@v2
+ uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: apps/${{ env.APP_NAME }}/composer.json
@@ -107,7 +109,7 @@ jobs:
- name: Check PHPUnit config file existence
id: check_phpunit
- uses: andstor/file-existence-action@v2
+ uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_CONFIG }}
@@ -119,7 +121,7 @@ jobs:
- name: Check PHPUnit integration config file existence
id: check_integration
- uses: andstor/file-existence-action@v2
+ uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }}
diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml
index 17c9b4bf2..9750fbb1f 100644
--- a/.github/workflows/phpunit-oci.yml
+++ b/.github/workflows/phpunit-oci.yml
@@ -59,27 +59,29 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Checkout server
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}
- name: Checkout app
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
with:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
- uses: shivammathur/setup-php@v2
+ uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, oci8
coverage: none
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check composer file existence
id: check_composer
- uses: andstor/file-existence-action@v2
+ uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: apps/${{ env.APP_NAME }}/composer.json
@@ -99,7 +101,7 @@ jobs:
- name: Check PHPUnit config file existence
id: check_phpunit
- uses: andstor/file-existence-action@v2
+ uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_CONFIG }}
@@ -111,7 +113,7 @@ jobs:
- name: Check PHPUnit integration config file existence
id: check_integration
- uses: andstor/file-existence-action@v2
+ uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }}
diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml
index 189f9be68..ee80c6c76 100644
--- a/.github/workflows/phpunit-pgsql.yml
+++ b/.github/workflows/phpunit-pgsql.yml
@@ -64,27 +64,29 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Checkout server
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}
- name: Checkout app
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
with:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
- uses: shivammathur/setup-php@v2
+ uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, iconv, fileinfo, intl, pgsql, pdo_pgsql
coverage: none
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check composer file existence
id: check_composer
- uses: andstor/file-existence-action@v2
+ uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: apps/${{ env.APP_NAME }}/composer.json
@@ -104,7 +106,7 @@ jobs:
- name: Check PHPUnit config file existence
id: check_phpunit
- uses: andstor/file-existence-action@v2
+ uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_CONFIG }}
@@ -116,7 +118,7 @@ jobs:
- name: Check PHPUnit integration config file existence
id: check_integration
- uses: andstor/file-existence-action@v2
+ uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }}
diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml
index 3304e1ff3..bbafb1455 100644
--- a/.github/workflows/phpunit-sqlite.yml
+++ b/.github/workflows/phpunit-sqlite.yml
@@ -53,27 +53,29 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Checkout server
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}
- name: Checkout app
- uses: actions/checkout@v3
+ uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
with:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
- uses: shivammathur/setup-php@v2
+ uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c