From dafe13645e9439eb8a3ed4848eeda3cbc6a1134a Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 28 May 2024 15:58:24 +0200 Subject: [PATCH] chore: Update CI workflow files from template Signed-off-by: Ferdinand Thiessen --- .github/workflows/command-l10n-update.yml | 3 ++ .github/workflows/cypress.yml | 19 ++++++--- .../workflows/dependabot-approve-merge.yml | 5 ++- .github/workflows/fixup.yml | 3 ++ .github/workflows/l10n.yml | 3 ++ .../workflows/lint-eslint-when-unrelated.yml | 39 ------------------- .github/workflows/lint-eslint.yml | 10 ++--- .github/workflows/lint-stylelint.yml | 9 +++-- .github/workflows/node-test.yml | 16 ++++++-- .github/workflows/npm-publish.yml | 14 +++++-- .github/workflows/server-styling-update.yml | 3 ++ .github/workflows/transifex-approve-merge.yml | 3 ++ .github/workflows/update_timezones.yml | 3 ++ 13 files changed, 69 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/lint-eslint-when-unrelated.yml diff --git a/.github/workflows/command-l10n-update.yml b/.github/workflows/command-l10n-update.yml index d516e216e7..9c1e4871ab 100644 --- a/.github/workflows/command-l10n-update.yml +++ b/.github/workflows/command-l10n-update.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: Command L10n Update on: issue_comment: diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 248be7cabe..a15468aacf 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -1,11 +1,18 @@ +# 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 +# +# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: Cypress -on: - pull_request: - push: - branches: - - master - - stable* +on: pull_request + +concurrency: + group: cypress-${{ github.head_ref || github.run_id }} + cancel-in-progress: true env: APP_NAME: nextcloud-vue diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml index 9951547f76..bd7667c918 100644 --- a/.github/workflows/dependabot-approve-merge.yml +++ b/.github/workflows/dependabot-approve-merge.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Dependabot @@ -21,7 +24,7 @@ concurrency: jobs: auto-approve-merge: - if: github.actor == 'dependabot[bot]' + if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]' runs-on: ubuntu-latest permissions: # for hmarr/auto-approve-action to approve PRs diff --git a/.github/workflows/fixup.yml b/.github/workflows/fixup.yml index 807f5fdc08..1444299925 100644 --- a/.github/workflows/fixup.yml +++ b/.github/workflows/fixup.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Block fixup and squash commits diff --git a/.github/workflows/l10n.yml b/.github/workflows/l10n.yml index 3be2c2e78e..8fc1d0ccd0 100644 --- a/.github/workflows/l10n.yml +++ b/.github/workflows/l10n.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: L10n on: pull_request diff --git a/.github/workflows/lint-eslint-when-unrelated.yml b/.github/workflows/lint-eslint-when-unrelated.yml deleted file mode 100644 index 7a2e9f0581..0000000000 --- a/.github/workflows/lint-eslint-when-unrelated.yml +++ /dev/null @@ -1,39 +0,0 @@ -# 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 -# -# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions -# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks - -name: Lint eslint - -on: - pull_request: - paths-ignore: - - '.github/workflows/**' - - 'src/**' - - 'appinfo/info.xml' - - 'package.json' - - 'package-lock.json' - - 'tsconfig.json' - - '.eslintrc.*' - - '.eslintignore' - - '**.js' - - '**.ts' - - '**.vue' - -permissions: - contents: read - -jobs: - lint: - permissions: - contents: none - - runs-on: ubuntu-latest - - name: eslint - - steps: - - run: 'echo "No eslint required"' diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml index 41ca8572ca..07b3cac15f 100644 --- a/.github/workflows/lint-eslint.yml +++ b/.github/workflows/lint-eslint.yml @@ -3,8 +3,8 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # -# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions -# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Lint eslint @@ -53,17 +53,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - name: Read package.json node and npm engines version uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 id: versions with: fallbackNode: '^20' - fallbackNpm: '^9' + fallbackNpm: '^10' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3 + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} diff --git a/.github/workflows/lint-stylelint.yml b/.github/workflows/lint-stylelint.yml index 8ac4a95e02..3e200c3355 100644 --- a/.github/workflows/lint-stylelint.yml +++ b/.github/workflows/lint-stylelint.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Lint stylelint @@ -22,17 +25,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - name: Read package.json node and npm engines version uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 id: versions with: fallbackNode: '^20' - fallbackNpm: '^9' + fallbackNpm: '^10' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3 + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index 608d1977c8..cf298c9328 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -1,3 +1,11 @@ +# 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 +# +# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: Node tests on: @@ -49,17 +57,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - name: Read package.json node and npm engines version uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 id: versions with: fallbackNode: '^20' - fallbackNpm: '^9' + fallbackNpm: '^10' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -80,7 +88,7 @@ jobs: run: npm run test:coverage --if-present - name: Collect coverage - uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1 + uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1 with: files: ./coverage/lcov.info diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index bcf3a635d6..7c98e19dc8 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Publish @@ -22,18 +25,23 @@ jobs: RELEASE_GROUP: ${{ (contains(github.ref, 'beta') || contains(github.ref, 'alpha')) && 'next' || 'latest' }} steps: + - name: Check actor permission level + uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0 + with: + require: write + - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - name: Read package.json node and npm engines version uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 id: versions with: fallbackNode: '^20' - fallbackNpm: '^9' + fallbackNpm: '^10' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3 + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} diff --git a/.github/workflows/server-styling-update.yml b/.github/workflows/server-styling-update.yml index 8aac0a6e81..5cc61ca20e 100644 --- a/.github/workflows/server-styling-update.yml +++ b/.github/workflows/server-styling-update.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: Update server styling on: diff --git a/.github/workflows/transifex-approve-merge.yml b/.github/workflows/transifex-approve-merge.yml index 10f6799c71..84470d31a8 100644 --- a/.github/workflows/transifex-approve-merge.yml +++ b/.github/workflows/transifex-approve-merge.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: Transifex on: pull_request diff --git a/.github/workflows/update_timezones.yml b/.github/workflows/update_timezones.yml index 9a6652cb0f..10062da559 100644 --- a/.github/workflows/update_timezones.yml +++ b/.github/workflows/update_timezones.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: Update timezones-data (zones.json) on: