diff --git a/.github/actions-lock.txt b/.github/actions-lock.txt index 7d43961d..d9899097 100644 --- a/.github/actions-lock.txt +++ b/.github/actions-lock.txt @@ -1,20 +1,20 @@ # SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors # SPDX-License-Identifier: MIT -c5ce8fbd4caa30c89fb31be5a9aeb25d appstore-build-publish.yml -003108ea0f5c12e1db591cd4613304d8 dependabot-approve-merge.yml +d4697182231bf364a34d8dd8b9e52a00 appstore-build-publish.yml +e6351c608939c31ae1e32923aa82aa10 dependabot-approve-merge.yml 2581a67c5bcdcd570427e6d51db767d7 fixup.yml -784303cf47612e5c4eac621dfab5b4f4 lint-info-xml.yml -bb17aa6898f48f4caa83922c343731dc lint-php-cs.yml -70673e479df96e3e71fe966cb07c82fa lint-php.yml -883b4be7752bdbc342b6dbf7794dc378 phpunit-mariadb.yml -52f8aa335a0a3ca1eeee7380854ff5ad phpunit-mysql.yml -69b6d61696a328b8a17ad4aa6cb2a059 phpunit-oci.yml -8e00d464a8ef10740b95dc2132244626 phpunit-pgsql.yml -a7ae3a2b7529b41dae1302420eb72454 phpunit-sqlite.yml +c5893d7af1998af66d22f8c171ff4448 lint-info-xml.yml +870b483dbcbca59479211270d61546dd lint-php-cs.yml +ee2b04d185b82fe7dd6fe6d83c6c7b45 lint-php.yml +8cdb2530228c6e32c4a77ae012873f46 phpunit-mariadb.yml +07e60b2f304c749ee563f1256caf2793 phpunit-mysql.yml +b98798d397dd45f12c777038d230509e phpunit-oci.yml +4bf29a4d193f83443d16d368c60a7870 phpunit-pgsql.yml +21244b02c3f1ad7d78951ba1b876638f phpunit-sqlite.yml 3c4a096b3b7dbaef0f8e5190ffe13518 pr-feedback.yml -a6e484812c25ced8bb714182656e0ab1 psalm.yml -e2bd0fc8a290e1a8641487944e27103b reuse.yml -e3c7b8f43850ad1d31c67fc0082b6bb8 sync-workflow-templates.yml +20b5d0d45766e3793f19c9c0c8d05140 psalm.yml +3975dc58817119d596a8f6ed190352ce reuse.yml +9799b1a6a842b5c0076b76de651a0e0d sync-workflow-templates.yml a3440826636c0fd7c2d20b1de50363da update-nextcloud-ocp-approve-merge.yml -eb943a065c2a0711c14468fa76629eae update-nextcloud-ocp.yml +39db87018db395caf41007931817cdbd update-nextcloud-ocp.yml 22604c31b526de270a080eb19967a638 update-stable-titles.yml diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml index dd28a484..76340acb 100644 --- a/.github/workflows/dependabot-approve-merge.yml +++ b/.github/workflows/dependabot-approve-merge.yml @@ -26,6 +26,13 @@ jobs: auto-approve-merge: if: github.event.pull_request.user.login == 'dependabot[bot]' runs-on: ubuntu-latest-low + env: + # env variable for maintainers: 'true' allows to auto-merge 1.0.2 -> 2.0.0 + ALLOW_MAJOR: false + # env variable for maintainers: 'true' allows to auto-merge 1.0.2 -> 1.1.0 + ALLOW_MINOR: true + # env variable for maintainers: RegExp string to ignore some dependencies from auto-approve and auto-merge + IGNORE_PATTERN: '' permissions: # for auto-approve step to work pull-requests: write @@ -46,12 +53,32 @@ jobs: - name: Dependabot metadata id: metadata + if: startsWith(steps.branchname.outputs.branch, 'dependabot/') uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} - - name: GitHub actions bot approve + - name: Check for ignored dependencies in the PR + id: validate if: startsWith(steps.branchname.outputs.branch, 'dependabot/') + env: + IGNORE_PATTERN: ${{ env.IGNORE_PATTERN }} + DEPENDENCY_NAMES: ${{ steps.metadata.outputs.dependency-names }} + run: | + if [[ -z ${IGNORE_PATTERN} ]]; then + echo "ignore=false" >> "$GITHUB_OUTPUT" + elif [[ -z ${DEPENDENCY_NAMES} ]]; then + echo "ignore=false" >> "$GITHUB_OUTPUT" + elif [[ ${DEPENDENCY_NAMES} =~ ${IGNORE_PATTERN} ]]; then + echo "ignore=true" >> "$GITHUB_OUTPUT" + fi + + - name: GitHub actions bot approve + id: auto_approve + if: ${{ + startsWith(steps.branchname.outputs.branch, 'dependabot/') + && steps.validate.outputs.ignore != 'true' + }} run: gh pr review --approve "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} @@ -60,6 +87,15 @@ jobs: # Enable GitHub auto merge - name: Auto merge uses: alexwilson/enable-github-automerge-action@2c32e18a76e0726ffe7a573bfff2d42a20885126 # 3.0.0 - if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && (github.event.action == 'opened' || github.event.action == 'reopened') && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor') + if: ${{ + startsWith(steps.branchname.outputs.branch, 'dependabot/') + && steps.auto_approve.conclusion == 'success' + && (github.event.action == 'opened' || github.event.action == 'reopened') + && ( + steps.metadata.outputs.update-type == 'version-update:semver-patch' + || (fromJSON(env.ALLOW_MINOR) && steps.metadata.outputs.update-type == 'version-update:semver-minor') + || (fromJSON(env.ALLOW_MAJOR) && steps.metadata.outputs.update-type == 'version-update:semver-major') + ) + }} with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/phpunit-mariadb.yml b/.github/workflows/phpunit-mariadb.yml index e4c7b426..fe3862b1 100644 --- a/.github/workflows/phpunit-mariadb.yml +++ b/.github/workflows/phpunit-mariadb.yml @@ -107,7 +107,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Checkout app (richdocuments) - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false path: apps/richdocuments @@ -115,7 +115,7 @@ jobs: ref: ${{ matrix.richdocuments-versions }} - name: Checkout app (groupfolders) - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false path: apps/groupfolders diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index c0a400f6..9f49ac1b 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -103,7 +103,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Checkout app (richdocuments) - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false path: apps/richdocuments @@ -111,7 +111,7 @@ jobs: ref: ${{ matrix.richdocuments-versions }} - name: Checkout app (groupfolders) - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false path: apps/groupfolders diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index 7a31cbbc..271a32d5 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -117,7 +117,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Checkout app (richdocuments) - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false path: apps/richdocuments @@ -125,7 +125,7 @@ jobs: ref: ${{ matrix.richdocuments-versions }} - name: Checkout app (groupfolders) - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false path: apps/groupfolders diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index a45139a8..6df560b7 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -108,7 +108,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Checkout app (richdocuments) - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false path: apps/richdocuments @@ -116,7 +116,7 @@ jobs: ref: ${{ matrix.richdocuments-versions }} - name: Checkout app (groupfolders) - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false path: apps/groupfolders diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index 67fb29fd..56d69637 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -97,7 +97,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Checkout app (richdocuments) - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false path: apps/richdocuments @@ -105,7 +105,7 @@ jobs: ref: ${{ matrix.richdocuments-versions }} - name: Checkout app (groupfolders) - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false path: apps/groupfolders