Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/actions-lock.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ aaa395a26591445ccf4c8196d7f01ee7 pr-feedback.yml
6c355cb7b5d4da4d56a58e6d7f82881b psalm-matrix.yml
2dbec18233063b42f4d8e03bbb43671c reuse.yml
b47a9fe981a7435caea92db33f5ad121 sync-workflow-templates.yml
a3440826636c0fd7c2d20b1de50363da update-nextcloud-ocp-approve-merge.yml
5136d37752a491c7ed2071b9241b94fd update-nextcloud-ocp-matrix.yml
22604c31b526de270a080eb19967a638 update-stable-titles.yml
ab958fa2b07234fceab6b6d836fb7f19 npm-build.yml
Expand Down
25 changes: 23 additions & 2 deletions .github/workflows/npm-audit-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ on:
- cron: '30 2 * * 0'

permissions:
contents: read
contents: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest

env:
# env variable for maintainers: 'false' disables auto-merge for these pull requests
AUTOMERGE: true

strategy:
fail-fast: false
matrix:
Expand All @@ -29,7 +34,6 @@ jobs:
- 'stable35'
- 'stable34'
- 'stable33'
- 'stable32'

name: npm-audit-fix-${{ matrix.branches }}

Expand Down Expand Up @@ -70,6 +74,7 @@ jobs:
npm run build --if-present

- name: Create Pull Request
id: create-pull-request
if: steps.checkout.outcome == 'success'
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
Expand All @@ -84,3 +89,19 @@ jobs:
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 }}
59 changes: 0 additions & 59 deletions .github/workflows/update-nextcloud-ocp-approve-merge.yml

This file was deleted.

24 changes: 23 additions & 1 deletion .github/workflows/update-nextcloud-ocp-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ on:
- cron: '5 2 * * 0'

permissions:
contents: read
contents: write
issues: write
pull-requests: write

jobs:
update-nextcloud-ocp:
Expand All @@ -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:
Expand Down Expand Up @@ -91,6 +96,7 @@ jobs:
body: 'Please check the output of the GitHub action and manually resolve the issues<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }}'

- name: Create Pull Request
id: create-pull-request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
Expand All @@ -110,3 +116,19 @@ jobs:
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 }}
Loading