From 8d22b655334d28d8ede16f62bca56fbb46a18422 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Wed, 25 Oct 2023 09:15:02 +0200 Subject: [PATCH] ci: update workflows from templates Signed-off-by: Richard Steinmetz --- .github/workflows/appstore-build-publish.yml | 19 +++++++++++-------- .github/workflows/psalm-matrix.yml | 9 +++++---- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/appstore-build-publish.yml b/.github/workflows/appstore-build-publish.yml index 90453eb0..9c9bfece 100644 --- a/.github/workflows/appstore-build-publish.yml +++ b/.github/workflows/appstore-build-publish.yml @@ -32,7 +32,7 @@ jobs: echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV - name: Checkout - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: path: ${{ env.APP_NAME }} @@ -44,19 +44,19 @@ jobs: expression: "//info//dependencies//nextcloud/@min-version" - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2 + uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 id: versions # Continue if no package.json continue-on-error: true with: path: ${{ env.APP_NAME }} - fallbackNode: "^16" - fallbackNpm: "^7" + fallbackNode: '^20' + fallbackNpm: '^9' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} # Skip if no package.json if: ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 + uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -66,7 +66,7 @@ jobs: run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - name: Set up php ${{ env.PHP_VERSION }} - uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2 + uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2 with: php-version: ${{ env.PHP_VERSION }} coverage: none @@ -88,6 +88,8 @@ jobs: - name: Build ${{ env.APP_NAME }} # Skip if no package.json if: ${{ steps.versions.outputs.nodeVersion }} + env: + CYPRESS_INSTALL_BINARY: 0 run: | cd ${{ env.APP_NAME }} npm ci @@ -126,9 +128,10 @@ jobs: unzip latest-$NCVERSION.zip - name: Checkout server master fallback - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 if: ${{ steps.server-checkout.outcome != 'success' }} with: + submodules: true repository: nextcloud/server path: nextcloud @@ -148,7 +151,7 @@ jobs: tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }} - name: Attach tarball to github release - uses: svenstaro/upload-release-action@133984371c30d34e38222a64855679a414cb7575 # v2 + uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2 id: attach_to_release with: repo_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/psalm-matrix.yml b/.github/workflows/psalm-matrix.yml index 0acf4cbe..d6fe4d4d 100644 --- a/.github/workflows/psalm-matrix.yml +++ b/.github/workflows/psalm-matrix.yml @@ -24,18 +24,19 @@ jobs: # do not stop on another job's failure fail-fast: false matrix: - ocp-version: [ 'dev-master', 'dev-stable25', 'dev-stable26' ] + ocp-version: [ 'dev-master', 'dev-stable27', 'dev-stable26', 'dev-stable25'] name: Nextcloud ${{ matrix.ocp-version }} steps: - name: Checkout - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up php - uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2 + uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2 with: php-version: 8.0 coverage: none + ini-file: development env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -43,7 +44,7 @@ jobs: run: composer i - name: Install dependencies - run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} --ignore-platform-reqs + run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} --ignore-platform-reqs --with-dependencies - name: Run coding standards check run: composer run psalm