diff --git a/.github/actions-lock.txt b/.github/actions-lock.txt index 8055cfe..d3df669 100644 --- a/.github/actions-lock.txt +++ b/.github/actions-lock.txt @@ -1,16 +1,16 @@ # SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors # SPDX-License-Identifier: MIT -fe1239ed98a163abbdea3e0490c85458 appstore-build-publish.yml +2afe22a01c1c2413f0cf48d010a13396 appstore-build-publish.yml 19ab9c47c8d96de93f37fab242c398cc block-unconventional-commits.yml -e6351c608939c31ae1e32923aa82aa10 dependabot-approve-merge.yml +c1476a553c3223e70e49de980f22315e dependabot-approve-merge.yml 2581a67c5bcdcd570427e6d51db767d7 fixup.yml 43fd0c5fb704cabc5f11cdfaf513236d lint-info-xml.yml -4b40dd0073e16f74dd04e6d49dcc043d lint-php-cs.yml -cfb31e47b6e9ab65e76c89b028754a4e lint-php.yml -d1821b8a816578070ed8fd018f321f6d pr-feedback.yml -6dc046dfbca5dc65d938265c518fcac4 psalm.yml +79006ab196f5664fc444e63645cfd8a7 lint-php-cs.yml +300be6a756abda800e40850918f2d964 lint-php.yml +aaa395a26591445ccf4c8196d7f01ee7 pr-feedback.yml +4f1080b33778a956a08efc7a41a11994 psalm.yml 2dbec18233063b42f4d8e03bbb43671c reuse.yml -b47a9fe981a7435caea92db33f5ad121 sync-workflow-templates.yml -a3440826636c0fd7c2d20b1de50363da update-nextcloud-ocp-approve-merge.yml -1919e2ff468e875aeeae5fd088d4ce1f update-nextcloud-ocp.yml +511439ba27869e0324f283142cc8b3df sync-workflow-templates.yml +abcb8206c3f6c5a9dc86cccf57846bfc update-nextcloud-ocp-approve-merge.yml +8ce35c51ee3d9cc735faab60c5d6f350 update-nextcloud-ocp.yml bea8a43904976fa01f1e091046541b37 release-relay.yml diff --git a/.github/workflows/appstore-build-publish.yml b/.github/workflows/appstore-build-publish.yml index c0b6cde..ba35bd8 100644 --- a/.github/workflows/appstore-build-publish.yml +++ b/.github/workflows/appstore-build-publish.yml @@ -59,7 +59,7 @@ jobs: expression: "//info//dependencies//nextcloud/@min-version" - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 + uses: skjnldsv/read-package-engines-version-actions@06d6db44aa62f4609ba070f556ec24bc99fb85cb # v4 id: versions # Continue if no package.json continue-on-error: true @@ -83,7 +83,7 @@ jobs: - name: Get php version id: php-versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 with: filename: ${{ env.APP_NAME }}/appinfo/info.xml @@ -194,7 +194,7 @@ jobs: overwrite: true - name: Upload app to Nextcloud appstore - uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3 + uses: nextcloud-libraries/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3 with: app_name: ${{ env.APP_NAME }} appstore_token: ${{ secrets.APPSTORE_TOKEN }} diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml index 76340ac..eaa1e9f 100644 --- a/.github/workflows/dependabot-approve-merge.yml +++ b/.github/workflows/dependabot-approve-merge.yml @@ -9,7 +9,7 @@ name: Auto approve Dependabot PRs on: - pull_request_target: # zizmor: ignore[dangerous-triggers] + pull_request: branches: - main - master diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index dba0956..06d0842 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -31,7 +31,7 @@ jobs: - name: Get php version id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 - name: Set up php${{ steps.versions.outputs.php-min }} uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index e73949e..e4c6e9b 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -31,7 +31,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 php-lint: runs-on: ubuntu-latest-low diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml index 4420bf6..1bd9c59 100644 --- a/.github/workflows/pr-feedback.yml +++ b/.github/workflows/pr-feedback.yml @@ -36,7 +36,7 @@ jobs: blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -) echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT" - - uses: nextcloud/pr-feedback-action@5227c55be184087d0aef6338bee210d8620b6297 # v1.0.1 + - uses: nextcloud-libraries/pr-feedback-action@5227c55be184087d0aef6338bee210d8620b6297 # v1.0.1 with: feedback-message: | Hello there, diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index eafcfeb..d6e2d52 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -30,7 +30,7 @@ jobs: - name: Get php version id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 - name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml diff --git a/.github/workflows/sync-workflow-templates.yml b/.github/workflows/sync-workflow-templates.yml index 4f52969..40d39e1 100644 --- a/.github/workflows/sync-workflow-templates.yml +++ b/.github/workflows/sync-workflow-templates.yml @@ -29,7 +29,6 @@ jobs: - 'stable35' - 'stable34' - 'stable33' - - 'stable32' name: Update workflows in ${{ matrix.branches }} diff --git a/.github/workflows/update-nextcloud-ocp-approve-merge.yml b/.github/workflows/update-nextcloud-ocp-approve-merge.yml deleted file mode 100644 index 88c54da..0000000 --- a/.github/workflows/update-nextcloud-ocp-approve-merge.yml +++ /dev/null @@ -1,59 +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 -# -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Auto approve nextcloud/ocp - -on: - pull_request_target: # zizmor: ignore[dangerous-triggers] - branches: - - main - - master - - stable* - -permissions: - contents: read - -concurrency: - group: update-nextcloud-ocp-approve-merge-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - auto-approve-merge: - if: github.actor == 'nextcloud-command' - runs-on: ubuntu-latest-low - permissions: - # for auto-approve-action to approve PRs - pull-requests: write - # for alexwilson/enable-github-automerge-action to approve PRs - contents: write - - steps: - - name: Disabled on forks - if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} - run: | - echo 'Can not approve PRs from forks' - exit 1 - - - uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0 - id: branchname - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: GitHub actions bot approve - if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp') - run: gh pr review --approve "$PR_URL" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Enable GitHub auto merge - - name: Auto merge - uses: alexwilson/enable-github-automerge-action@2c32e18a76e0726ffe7a573bfff2d42a20885126 # 3.0.0 - if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp') - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index 2d359af..894bc13 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -14,8 +14,9 @@ on: - cron: "5 2 * * 0" permissions: - contents: read + contents: write issues: write + pull-requests: write jobs: update-nextcloud-ocp: @@ -24,6 +25,10 @@ jobs: # Only allowed to be run on nextcloud repositories if: ${{ github.repository_owner == 'nextcloud' }} + env: + # env variable for maintainers: 'false' disables auto-merge for these pull requests + AUTOMERGE: true + strategy: fail-fast: false matrix: @@ -32,7 +37,6 @@ jobs: - 'stable35' - 'stable34' - 'stable33' - - 'stable32' name: update-nextcloud-ocp-${{ matrix.branches }} @@ -101,6 +105,7 @@ jobs: 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: Create Pull Request + id: create-pull-request if: steps.checkout.outcome == 'success' uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: @@ -111,13 +116,25 @@ jobs: signoff: true branch: 'automated/noid/${{ matrix.branches }}-update-nextcloud-ocp' title: '[${{ matrix.branches }}] Update nextcloud/ocp dependency' - add-path: | - composer.json - composer.lock - vendor-bin/nextcloud-ocp/composer.json - vendor-bin/nextcloud-ocp/composer.lock + add-paths: ${{ steps.check_composer_bin.outputs.files_exists == 'true' && 'vendor-bin/nextcloud-ocp/composer.json,vendor-bin/nextcloud-ocp/composer.lock' || 'composer.json,composer.lock' }} body: | Auto-generated update of [nextcloud/ocp](https://github.com/nextcloud-deps/ocp/) dependency labels: | dependencies 3. to review + + # Approve using the default GITHUB_TOKEN, as the PR itself was created + # using COMMAND_BOT_PAT and GitHub does not allow an account to approve its own PR + - name: GitHub actions bot approve + if: steps.create-pull-request.outputs.pull-request-operation != 'none' + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{ steps.create-pull-request.outputs.pull-request-url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Enable auto merge + if: steps.create-pull-request.outputs.pull-request-operation != 'none' && fromJSON(env.AUTOMERGE) + uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + pull-request-number: ${{ steps.create-pull-request.outputs.pull-request-number }}