From 86dacbf827b783160ca246b63af7288986e69481 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 21 Sep 2023 19:46:19 +0200 Subject: [PATCH] ci: Update workflows from templates Signed-off-by: Max --- .github/workflows/lint-eslint.yml | 2 ++ .github/workflows/lint-stylelint.yml | 2 ++ .github/workflows/node.yml | 6 ++++-- .github/workflows/pr-feedback.yml | 9 +++++++-- .github/workflows/update-nextcloud-ocp-matrix.yml | 15 +++++++++++++++ 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml index 3a2983f05..95a7f256a 100644 --- a/.github/workflows/lint-eslint.yml +++ b/.github/workflows/lint-eslint.yml @@ -56,6 +56,8 @@ jobs: run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - name: Install dependencies + env: + CYPRESS_INSTALL_BINARY: 0 run: npm ci - name: Lint diff --git a/.github/workflows/lint-stylelint.yml b/.github/workflows/lint-stylelint.yml index 7108a2fa1..71aec7002 100644 --- a/.github/workflows/lint-stylelint.yml +++ b/.github/workflows/lint-stylelint.yml @@ -40,6 +40,8 @@ jobs: run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - name: Install dependencies + env: + CYPRESS_INSTALL_BINARY: 0 run: npm ci - name: Lint diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 963d92c70..17a69116b 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -43,8 +43,8 @@ jobs: uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 id: versions with: - fallbackNode: '^16' - fallbackNpm: '^7' + fallbackNode: '^20' + fallbackNpm: '^9' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3 @@ -55,6 +55,8 @@ jobs: run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - name: Install dependencies & build + env: + CYPRESS_INSTALL_BINARY: 0 run: | npm ci npm run build --if-present diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml index 5976f5601..e85c4ecd7 100644 --- a/.github/workflows/pr-feedback.yml +++ b/.github/workflows/pr-feedback.yml @@ -1,3 +1,8 @@ +# 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: 'Ask for feedback on PRs' on: schedule: @@ -5,7 +10,7 @@ on: jobs: pr-feedback: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: The get-github-handles-from-website action uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0 @@ -25,5 +30,5 @@ jobs: Thank you for contributing to Nextcloud and we hope to hear from you soon! days-before-feedback: 14 start-date: "2023-07-10" - exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command" + exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot,skjnldsv" exempt-bots: true diff --git a/.github/workflows/update-nextcloud-ocp-matrix.yml b/.github/workflows/update-nextcloud-ocp-matrix.yml index 1691cae0e..f7ebd21bd 100644 --- a/.github/workflows/update-nextcloud-ocp-matrix.yml +++ b/.github/workflows/update-nextcloud-ocp-matrix.yml @@ -38,12 +38,27 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Read codeowners + id: codeowners + run: | + grep '/appinfo/info.xml' .github/CODEOWNERS | cut -f 2- -d ' ' | xargs | awk '{ print "codeowners="$0 }' >> $GITHUB_OUTPUT + continue-on-error: true + - name: Composer install run: composer install - name: Composer update nextcloud/ocp + id: update_branch run: composer require --dev nextcloud/ocp:dev-${{ matrix.target }} + - name: Raise on issue on failure + uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1 + if: ${{ failure() && steps.update_branch.conclusion == 'failure' }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + title: Failed to update nextcloud/ocp package} + body: Please check the output of the GitHub action and manually resolve the issues
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
${{ steps.codeowners.outputs.codeowners }} + - name: Reset checkout 3rdparty run: | git clean -f 3rdparty