Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/command-l10n-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
reactions: '+1'

- name: Parse command
uses: skjnldsv/parse-command-comment@5c955203c52424151e6d0e58fb9de8a9f6a605a1 # v3.1.0
uses: skjnldsv/parse-command-comment@5c955203c52424151e6d0e58fb9de8a9f6a605a1 # v3.1
id: command

- name: Init branch
Expand Down
46 changes: 41 additions & 5 deletions .github/workflows/dependabot-approve-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'renovate[bot]'
runs-on: ubuntu-latest
permissions:
# for hmarr/auto-approve-action to approve PRs
# for auto-approve step to work
pull-requests: write
# for alexwilson/enable-github-automerge-action to approve PRs
contents: write
Expand All @@ -44,15 +44,51 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

# GitHub actions bot approve
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
- 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: 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 }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Enable GitHub auto merge
- name: Auto merge
uses: alexwilson/enable-github-automerge-action@2c32e18a76e0726ffe7a573bfff2d42a20885126 # v3.0.0
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
uses: alexwilson/enable-github-automerge-action@2c32e18a76e0726ffe7a573bfff2d42a20885126 # 3.0.0
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 }}
1 change: 1 addition & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ steps.versions.outputs.node-version }}
package-manager-cache: false

- name: Set up npm
run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: npm run test:coverage --if-present

- name: Collect coverage
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
files: ./coverage/lcov.info
env:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Node
# TODO: Remove this after a grace period of 6 months to give everyone the chance to switch to the new workflow name
# TODO: To be removed end of 2026.
name: No-op please switch to npm-build.yml

on: pull_request

permissions:
contents: read
contents: none

concurrency:
group: node-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ steps.versions.outputs.node-version }}
package-manager-cache: false
registry-url: https://registry.npmjs.org

- name: Set up npm
Expand Down