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
2 changes: 1 addition & 1 deletion .github/workflows/block-unconventional-commits.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://github.com/nextcloud-libraries/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/command-l10n-update.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud-libraries/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Command L10n Update
on:
issue_comment:
Expand All @@ -18,19 +24,19 @@ jobs:

steps:
- name: Add reaction on start
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "+1"

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

- name: Init branch
uses: xt0rted/pull-request-comment-branch@v3
uses: xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v3.0.0
id: comment-branch

process:
Expand All @@ -51,7 +57,7 @@ jobs:
git config --local user.name "nextcloud-command"

- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json

Expand Down Expand Up @@ -82,7 +88,7 @@ jobs:
git push --force origin ${{ needs.init.outputs.head_ref }}

- name: Add reaction on failure
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
if: failure()
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/command-playwright-update.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud-libraries/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

# Usage:
# /update-snapshots - update the snapshots and commit as a new commit
# /update-snapshots fixup - update but commit as a fixup commit
# /update-snapshots amend - update and commit as amended commit

name: Command update Playwright snapshots
on:
issue_comment:
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/dependabot-approve-merge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://github.com/nextcloud-libraries/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
Expand All @@ -9,7 +9,7 @@
name: Dependabot

on:
pull_request_target:
pull_request_target: # zizmor: ignore[dangerous-triggers]
branches:
- main
- master
Expand All @@ -24,13 +24,19 @@ concurrency:

jobs:
auto-approve-merge:
if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]'
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
pull-requests: 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

# GitHub actions bot approve
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fixup.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://github.com/nextcloud-libraries/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
Expand Down
53 changes: 6 additions & 47 deletions .github/workflows/lint-eslint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://github.com/nextcloud-libraries/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
Expand All @@ -18,47 +18,21 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- 'src/**'
- 'appinfo/info.xml'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- '.eslintrc.*'
- '.eslintignore'
- '**.js'
- '**.ts'
- '**.vue'

lint:
runs-on: ubuntu-latest

needs: changes
if: needs.changes.outputs.src != 'false'

name: NPM lint
name: eslint

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
node-version-file: 'package.json'

- name: Install dependencies
env:
Expand All @@ -68,18 +42,3 @@ jobs:

- name: Lint
run: npm run lint

summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: [changes, lint]

if: always()

# This is the summary, we just avoid to rename it so that branch protection rules still match
name: eslint

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi
8 changes: 5 additions & 3 deletions .github/workflows/lint-stylelint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://github.com/nextcloud-libraries/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
Expand All @@ -26,11 +26,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
node-version-file: 'package.json'

- name: Install dependencies
env:
Expand Down
51 changes: 6 additions & 45 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://github.com/nextcloud-libraries/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
Expand All @@ -24,45 +24,20 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- '__tests__/**'
- '__mocks__/**'
- 'src/**'
- 'appinfo/info.xml'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- '**.js'
- '**.ts'
- '**.vue'

test:
runs-on: ubuntu-latest

needs: changes
if: needs.changes.outputs.src != 'false'
name: node-tests

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
node-version-file: 'package.json'

- name: Install dependencies & build
env:
Expand All @@ -81,17 +56,3 @@ jobs:
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
with:
files: ./coverage/lcov.info

summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: [changes, test]

if: always()

name: test-summary

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi
18 changes: 12 additions & 6 deletions .github/workflows/npm-audit-fix.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://github.com/nextcloud-libraries/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
Expand All @@ -14,42 +14,48 @@ on:
# At 2:30 on Sundays
- cron: '30 2 * * 0'

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
branches: ['master', 'next']
branches: ['main', 'stable8']

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

steps:
- name: Checkout
id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
ref: ${{ matrix.branches }}
continue-on-error: true

- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
node-version-file: 'package.json'

- name: Fix npm audit
id: npm-audit
uses: nextcloud-libraries/npm-audit-action@1b1728b2b4a7a78d69de65608efcf4db0e3e42d0 # v0.2.0

- name: Run npm ci and npm run build
if: always()
if: steps.checkout.outcome == 'success'
env:
CYPRESS_INSTALL_BINARY: 0
run: |
npm ci
npm run build --if-present

- name: Create Pull Request
if: always()
if: steps.checkout.outcome == 'success'
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://github.com/nextcloud-libraries/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
Expand All @@ -22,16 +22,18 @@ jobs:

name: Build and publish to npm
env:
RELEASE_GROUP: ${{ (contains(github.ref, 'beta') || contains(github.ref, 'alpha')) && 'next' || 'latest' }}
RELEASE_GROUP: ${{ (contains(github.ref, 'rc') || contains(github.ref, 'beta') || contains(github.ref, 'alpha')) && 'next' || 'latest' }}

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
node-version-file: 'package.json'

- name: Install dependencies & build
env:
Expand Down
Loading
Loading