diff --git a/.github/workflows/block-merge-freeze.yml b/.github/workflows/block-merge-freeze.yml index e56884ccc..f2d029c99 100644 --- a/.github/workflows/block-merge-freeze.yml +++ b/.github/workflows/block-merge-freeze.yml @@ -3,14 +3,25 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -name: Pull request checks +name: Block merges during freezes -on: pull_request +on: + pull_request: + types: [opened, ready_for_review, reopened, synchronize] + +permissions: + contents: read + +concurrency: + group: block-merge-freeze-${{ github.head_ref || github.run_id }} + cancel-in-progress: true jobs: block-merges-during-freeze: name: Block merges during freezes + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest steps: diff --git a/.github/workflows/command-compile.yml b/.github/workflows/command-compile.yml index 9c67206df..82bdc8b8a 100644 --- a/.github/workflows/command-compile.yml +++ b/.github/workflows/command-compile.yml @@ -28,7 +28,7 @@ jobs: token: ${{ secrets.COMMAND_BOT_PAT }} repository: ${{ github.event.repository.full_name }} comment-id: ${{ github.event.comment.id }} - reaction-type: "+1" + reactions: "+1" - name: Parse command uses: skjnldsv/parse-command-comment@7cef1df370a99dfd5bf896d50121390c96785db8 # v2 @@ -54,7 +54,7 @@ jobs: steps: - name: Checkout ${{ needs.init.outputs.head_ref }} - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: token: ${{ secrets.COMMAND_BOT_PAT }} fetch-depth: 0 @@ -66,14 +66,14 @@ jobs: git config --local user.name "nextcloud-command" - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v1.2 + uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 id: package-engines-versions with: fallbackNode: '^16' fallbackNpm: '^7' - name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }} cache: npm @@ -90,7 +90,7 @@ jobs: if: ${{ needs.init.outputs.arg1 != 'fixup' && needs.init.outputs.arg1 != 'amend' }} run: | git add ${{ needs.init.outputs.git_path }} - git commit --signoff -m 'Compile assets' + git commit --signoff -m 'chore(assets): Recompile assets' git push origin ${{ needs.init.outputs.head_ref }} - name: Commit and push fixup @@ -114,4 +114,4 @@ jobs: token: ${{ secrets.COMMAND_BOT_PAT }} repository: ${{ github.event.repository.full_name }} comment-id: ${{ github.event.comment.id }} - reaction-type: "-1" + reactions: "-1" diff --git a/.github/workflows/command-rebase.yml b/.github/workflows/command-rebase.yml index 03109861e..ec95ccbbf 100644 --- a/.github/workflows/command-rebase.yml +++ b/.github/workflows/command-rebase.yml @@ -31,7 +31,7 @@ jobs: reaction-type: "+1" - name: Checkout the latest code - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: fetch-depth: 0 token: ${{ secrets.COMMAND_BOT_PAT }} diff --git a/.github/workflows/fixup.yml b/.github/workflows/fixup.yml index 1e2ed38a4..9548d19f2 100644 --- a/.github/workflows/fixup.yml +++ b/.github/workflows/fixup.yml @@ -3,7 +3,7 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -name: Pull request checks +name: Block fixup and squash commits on: pull_request: @@ -28,6 +28,6 @@ jobs: steps: - name: Run check - uses: xt0rted/block-autosquash-commits-action@79880c36b4811fe549cfffe20233df88876024e7 # v2 + uses: skjnldsv/block-fixup-merge-action@42d26e1b536ce61e5cf467d65fb76caf4aa85acf # v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint-eslint-when-unrelated.yml b/.github/workflows/lint-eslint-when-unrelated.yml index 63710eb66..7a2e9f058 100644 --- a/.github/workflows/lint-eslint-when-unrelated.yml +++ b/.github/workflows/lint-eslint-when-unrelated.yml @@ -6,7 +6,7 @@ # 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 +name: Lint eslint on: pull_request: diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml index c2c268d9f..ef56db29a 100644 --- a/.github/workflows/lint-eslint.yml +++ b/.github/workflows/lint-eslint.yml @@ -6,7 +6,7 @@ # 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 +name: Lint eslint on: pull_request: @@ -38,17 +38,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v1.2 + uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 id: versions with: fallbackNode: '^16' fallbackNpm: '^7' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index 887f491ac..f8d337511 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -3,7 +3,7 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -name: Lint +name: Lint php-cs on: pull_request @@ -22,13 +22,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Set up php - uses: shivammathur/setup-php@cb8f453143149404c7fd670b5f37c91d395b3054 # v2 + uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 with: php-version: 8.1 coverage: none + ini-file: development env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index b25f41fb7..8d7f63f84 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -3,7 +3,7 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -name: Lint +name: Lint php on: pull_request: @@ -31,13 +31,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@cb8f453143149404c7fd670b5f37c91d395b3054 # v2 + uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 with: php-version: ${{ matrix.php-versions }} coverage: none + ini-file: development env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint-stylelint.yml b/.github/workflows/lint-stylelint.yml index 917a6219e..82a552521 100644 --- a/.github/workflows/lint-stylelint.yml +++ b/.github/workflows/lint-stylelint.yml @@ -3,7 +3,7 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -name: Lint +name: Lint stylelint on: pull_request @@ -22,17 +22,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v1.2 + uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 id: versions with: fallbackNode: '^16' fallbackNpm: '^7' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 1c658d639..89df10487 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -37,17 +37,17 @@ jobs: name: node steps: - name: Checkout - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v1.2 + uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 id: versions with: fallbackNode: '^16' fallbackNpm: '^7' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} diff --git a/.github/workflows/npm-audit-fix.yml b/.github/workflows/npm-audit-fix.yml index 837358607..36b2fbb68 100644 --- a/.github/workflows/npm-audit-fix.yml +++ b/.github/workflows/npm-audit-fix.yml @@ -3,7 +3,7 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -name: npm audit fix and compile +name: Npm audit fix and compile on: workflow_dispatch: @@ -18,40 +18,44 @@ jobs: strategy: fail-fast: false matrix: - branches: ["main", "master", "stable26", "stable25", "stable24"] + branches: ["main", "master", "stable27", "stable26", "stable25", "stable24"] name: npm-audit-fix-${{ matrix.branches }} steps: - name: Checkout - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: ref: ${{ matrix.branches }} - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1 + uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 id: versions with: fallbackNode: '^16' fallbackNpm: '^7' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} - name: Set up npm ${{ steps.versions.outputs.npmVersion }} run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - - name: Fix npm audit, run npm ci and npm run build + - name: Fix npm audit run: | npm audit fix + + - name: Run npm ci and npm run build + if: always() + run: | npm ci npm run build --if-present - name: Create Pull Request if: always() - uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 # v3 + uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 # v5 with: token: ${{ secrets.COMMAND_BOT_PAT }} commit-message: "chore(deps): fix npm audit" diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index f2fc6ee18..7be48f261 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -24,13 +24,14 @@ jobs: name: Nextcloud steps: - name: Checkout - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Set up php - uses: shivammathur/setup-php@cb8f453143149404c7fd670b5f37c91d395b3054 # v2 + uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 with: php-version: 8.1 coverage: none + ini-file: development env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}