mirror of
https://github.com/chenasraf/workflows.git
synced 2026-05-17 17:28:03 +00:00
fix: nextcloud workflows path filters
This commit is contained in:
3
.github/workflows/nextcloud-build-npm.yml
vendored
3
.github/workflows/nextcloud-build-npm.yml
vendored
@@ -40,6 +40,9 @@ jobs:
|
||||
src: ${{ steps.changes.outputs.src }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
|
||||
43
.github/workflows/nextcloud-lint-appinfo-xml.yml
vendored
43
.github/workflows/nextcloud-lint-appinfo-xml.yml
vendored
@@ -18,13 +18,42 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: 'https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd'
|
||||
path-filters:
|
||||
description: 'Paths to filter on (YAML format)'
|
||||
required: false
|
||||
type: string
|
||||
default: |
|
||||
- 'appinfo/info.xml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
outputs:
|
||||
src: ${{ steps.changes.outputs.src }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
|
||||
xml-linters:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
|
||||
name: info.xml lint
|
||||
steps:
|
||||
@@ -39,3 +68,17 @@ jobs:
|
||||
with:
|
||||
xml-file: ${{ inputs.xml-file }}
|
||||
xml-schema-file: ./info.xsd
|
||||
|
||||
summary:
|
||||
permissions:
|
||||
contents: none
|
||||
runs-on: ubuntu-latest
|
||||
needs: [changes, xml-linters]
|
||||
|
||||
if: always()
|
||||
|
||||
name: appinfo-xml-summary
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.xml-linters.result != 'success' }}; then exit 1; fi
|
||||
|
||||
3
.github/workflows/nextcloud-lint-eslint.yml
vendored
3
.github/workflows/nextcloud-lint-eslint.yml
vendored
@@ -40,6 +40,9 @@ jobs:
|
||||
src: ${{ steps.changes.outputs.src }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
|
||||
46
.github/workflows/nextcloud-lint-openapi.yml
vendored
46
.github/workflows/nextcloud-lint-openapi.yml
vendored
@@ -18,15 +18,43 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: 'src/types/openapi/openapi*.ts'
|
||||
path-filters:
|
||||
description: 'Paths to filter on (YAML format)'
|
||||
required: false
|
||||
type: string
|
||||
default: |
|
||||
- 'lib/**/*.php'
|
||||
- 'openapi.json'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
outputs:
|
||||
src: ${{ steps.changes.outputs.src }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
|
||||
openapi:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -76,3 +104,17 @@ jobs:
|
||||
git status
|
||||
git --no-pager diff
|
||||
exit 1
|
||||
|
||||
summary:
|
||||
permissions:
|
||||
contents: none
|
||||
runs-on: ubuntu-latest
|
||||
needs: [changes, openapi]
|
||||
|
||||
if: always()
|
||||
|
||||
name: openapi-summary
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.openapi.result != 'success' && needs.openapi.result != 'skipped' }}; then exit 1; fi
|
||||
|
||||
44
.github/workflows/nextcloud-lint-php-cs.yml
vendored
44
.github/workflows/nextcloud-lint-php-cs.yml
vendored
@@ -18,13 +18,43 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: 'bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite'
|
||||
path-filters:
|
||||
description: 'Paths to filter on (YAML format)'
|
||||
required: false
|
||||
type: string
|
||||
default: |
|
||||
- '**.php'
|
||||
- '.php-cs-fixer.dist.php'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
outputs:
|
||||
src: ${{ steps.changes.outputs.src }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
|
||||
name: php-cs
|
||||
|
||||
@@ -51,3 +81,17 @@ jobs:
|
||||
|
||||
- name: Lint
|
||||
run: ${{ inputs.cs-check-command }}
|
||||
|
||||
summary:
|
||||
permissions:
|
||||
contents: none
|
||||
runs-on: ubuntu-latest
|
||||
needs: [changes, lint]
|
||||
|
||||
if: always()
|
||||
|
||||
name: php-cs-summary
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi
|
||||
|
||||
36
.github/workflows/nextcloud-lint-php.yml
vendored
36
.github/workflows/nextcloud-lint-php.yml
vendored
@@ -18,13 +18,42 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: 'bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite'
|
||||
path-filters:
|
||||
description: 'Paths to filter on (YAML format)'
|
||||
required: false
|
||||
type: string
|
||||
default: |
|
||||
- '**.php'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
outputs:
|
||||
src: ${{ steps.changes.outputs.src }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
|
||||
matrix:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
outputs:
|
||||
php-versions: ${{ steps.versions.outputs.php-versions }}
|
||||
steps:
|
||||
@@ -36,7 +65,8 @@ jobs:
|
||||
|
||||
php-lint:
|
||||
runs-on: ubuntu-latest
|
||||
needs: matrix
|
||||
needs: [changes, matrix]
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ${{fromJson(needs.matrix.outputs.php-versions)}}
|
||||
@@ -64,7 +94,7 @@ jobs:
|
||||
permissions:
|
||||
contents: none
|
||||
runs-on: ubuntu-latest
|
||||
needs: php-lint
|
||||
needs: [changes, php-lint]
|
||||
|
||||
if: always()
|
||||
|
||||
@@ -72,4 +102,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.php-lint.result != 'success' }}; then exit 1; fi
|
||||
|
||||
@@ -60,6 +60,9 @@ jobs:
|
||||
src: ${{ steps.changes.outputs.src }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
|
||||
@@ -86,6 +86,9 @@ jobs:
|
||||
src: ${{ steps.changes.outputs.src}}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
|
||||
@@ -74,6 +74,9 @@ jobs:
|
||||
src: ${{ steps.changes.outputs.src }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
|
||||
37
.github/workflows/nextcloud-psalm.yml
vendored
37
.github/workflows/nextcloud-psalm.yml
vendored
@@ -18,13 +18,43 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: 'bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite'
|
||||
path-filters:
|
||||
description: 'Paths to filter on (YAML format)'
|
||||
required: false
|
||||
type: string
|
||||
default: |
|
||||
- '**.php'
|
||||
- 'psalm.xml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
outputs:
|
||||
src: ${{ steps.changes.outputs.src }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
|
||||
matrix:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
outputs:
|
||||
ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }}
|
||||
steps:
|
||||
@@ -36,7 +66,8 @@ jobs:
|
||||
|
||||
static-analysis:
|
||||
runs-on: ubuntu-latest
|
||||
needs: matrix
|
||||
needs: [changes, matrix]
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson(needs.matrix.outputs.ocp-matrix) }}
|
||||
@@ -67,7 +98,7 @@ jobs:
|
||||
|
||||
summary:
|
||||
runs-on: ubuntu-latest
|
||||
needs: static-analysis
|
||||
needs: [changes, static-analysis]
|
||||
|
||||
if: always()
|
||||
|
||||
@@ -75,4 +106,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.static-analysis.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.static-analysis.result != 'success' }}; then exit 1; fi
|
||||
|
||||
3
.github/workflows/nextcloud-vitest.yml
vendored
3
.github/workflows/nextcloud-vitest.yml
vendored
@@ -46,6 +46,9 @@ jobs:
|
||||
src: ${{ steps.changes.outputs.src }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
|
||||
Reference in New Issue
Block a user