mirror of
https://github.com/chenasraf/workflows.git
synced 2026-05-17 17:28:03 +00:00
fix(nextcloud): improve filtering
This commit is contained in:
16
.github/workflows/nextcloud-build-npm.yml
vendored
16
.github/workflows/nextcloud-build-npm.yml
vendored
@@ -41,18 +41,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build filters
|
||||
id: build-filters
|
||||
run: |
|
||||
echo "yaml<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "src:" >> $GITHUB_OUTPUT
|
||||
echo '${{ inputs.path-filters }}' | sed 's/^/ /' >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
filters: ${{ steps.build-filters.outputs.yaml }}
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
|
||||
name: PNPM Build
|
||||
|
||||
@@ -83,4 +89,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.build.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src == 'true' && needs.build.result != 'success' }}; then exit 1; fi
|
||||
|
||||
16
.github/workflows/nextcloud-lint-appinfo-xml.yml
vendored
16
.github/workflows/nextcloud-lint-appinfo-xml.yml
vendored
@@ -40,18 +40,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build filters
|
||||
id: build-filters
|
||||
run: |
|
||||
echo "yaml<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "src:" >> $GITHUB_OUTPUT
|
||||
echo '${{ inputs.path-filters }}' | sed 's/^/ /' >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
filters: ${{ steps.build-filters.outputs.yaml }}
|
||||
|
||||
xml-linters:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
|
||||
name: info.xml lint
|
||||
steps:
|
||||
@@ -79,4 +85,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.xml-linters.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src == 'true' && needs.xml-linters.result != 'success' }}; then exit 1; fi
|
||||
|
||||
16
.github/workflows/nextcloud-lint-eslint.yml
vendored
16
.github/workflows/nextcloud-lint-eslint.yml
vendored
@@ -41,18 +41,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build filters
|
||||
id: build-filters
|
||||
run: |
|
||||
echo "yaml<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "src:" >> $GITHUB_OUTPUT
|
||||
echo '${{ inputs.path-filters }}' | sed 's/^/ /' >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
filters: ${{ steps.build-filters.outputs.yaml }}
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
|
||||
name: NPM lint
|
||||
|
||||
@@ -83,4 +89,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src == 'true' && needs.lint.result != 'success' }}; then exit 1; fi
|
||||
|
||||
16
.github/workflows/nextcloud-lint-openapi.yml
vendored
16
.github/workflows/nextcloud-lint-openapi.yml
vendored
@@ -41,18 +41,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build filters
|
||||
id: build-filters
|
||||
run: |
|
||||
echo "yaml<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "src:" >> $GITHUB_OUTPUT
|
||||
echo '${{ inputs.path-filters }}' | sed 's/^/ /' >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
filters: ${{ steps.build-filters.outputs.yaml }}
|
||||
|
||||
openapi:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh'
|
||||
if: needs.changes.outputs.src == 'true' && github.repository_owner != 'nextcloud-gmbh'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -115,4 +121,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.openapi.result != 'success' && needs.openapi.result != 'skipped' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src == 'true' && needs.openapi.result != 'success' && needs.openapi.result != 'skipped' }}; then exit 1; fi
|
||||
|
||||
16
.github/workflows/nextcloud-lint-php-cs.yml
vendored
16
.github/workflows/nextcloud-lint-php-cs.yml
vendored
@@ -41,18 +41,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build filters
|
||||
id: build-filters
|
||||
run: |
|
||||
echo "yaml<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "src:" >> $GITHUB_OUTPUT
|
||||
echo '${{ inputs.path-filters }}' | sed 's/^/ /' >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
filters: ${{ steps.build-filters.outputs.yaml }}
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
|
||||
name: php-cs
|
||||
|
||||
@@ -92,4 +98,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src == 'true' && needs.lint.result != 'success' }}; then exit 1; fi
|
||||
|
||||
18
.github/workflows/nextcloud-lint-php.yml
vendored
18
.github/workflows/nextcloud-lint-php.yml
vendored
@@ -40,18 +40,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build filters
|
||||
id: build-filters
|
||||
run: |
|
||||
echo "yaml<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "src:" >> $GITHUB_OUTPUT
|
||||
echo '${{ inputs.path-filters }}' | sed 's/^/ /' >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
filters: ${{ steps.build-filters.outputs.yaml }}
|
||||
|
||||
matrix:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
outputs:
|
||||
php-versions: ${{ steps.versions.outputs.php-versions }}
|
||||
steps:
|
||||
@@ -64,7 +70,7 @@ jobs:
|
||||
php-lint:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [changes, matrix]
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ${{fromJson(needs.matrix.outputs.php-versions)}}
|
||||
@@ -100,4 +106,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.php-lint.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src == 'true' && needs.php-lint.result != 'success' }}; then exit 1; fi
|
||||
|
||||
@@ -61,18 +61,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build filters
|
||||
id: build-filters
|
||||
run: |
|
||||
echo "yaml<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "src:" >> $GITHUB_OUTPUT
|
||||
echo '${{ inputs.path-filters }}' | sed 's/^/ /' >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
filters: ${{ steps.build-filters.outputs.yaml }}
|
||||
|
||||
incremental-pgsql:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
|
||||
name: Incremental Migration (PostgreSQL)
|
||||
|
||||
@@ -217,7 +223,7 @@ jobs:
|
||||
incremental-mysql:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
|
||||
name: Incremental Migration (MySQL)
|
||||
|
||||
@@ -369,4 +375,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && (needs.incremental-pgsql.result != 'success' || needs.incremental-mysql.result != 'success') }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src == 'true' && (needs.incremental-pgsql.result != 'success' || needs.incremental-mysql.result != 'success') }}; then exit 1; fi
|
||||
|
||||
18
.github/workflows/nextcloud-phpunit-mysql.yml
vendored
18
.github/workflows/nextcloud-phpunit-mysql.yml
vendored
@@ -59,18 +59,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build filters
|
||||
id: build-filters
|
||||
run: |
|
||||
echo "yaml<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "src:" >> $GITHUB_OUTPUT
|
||||
echo '${{ inputs.path-filters }}' | sed 's/^/ /' >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
filters: ${{ steps.build-filters.outputs.yaml }}
|
||||
|
||||
matrix:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
@@ -101,7 +107,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: [changes, matrix]
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
|
||||
@@ -232,4 +238,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-mysql.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src == 'true' && needs.phpunit-mysql.result != 'success' }}; then exit 1; fi
|
||||
|
||||
18
.github/workflows/nextcloud-phpunit-pgsql.yml
vendored
18
.github/workflows/nextcloud-phpunit-pgsql.yml
vendored
@@ -49,18 +49,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build filters
|
||||
id: build-filters
|
||||
run: |
|
||||
echo "yaml<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "src:" >> $GITHUB_OUTPUT
|
||||
echo '${{ inputs.path-filters }}' | sed 's/^/ /' >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
filters: ${{ steps.build-filters.outputs.yaml }}
|
||||
|
||||
matrix:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
@@ -89,7 +95,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: [changes, matrix]
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
|
||||
@@ -217,4 +223,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-pgsql.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src == 'true' && needs.phpunit-pgsql.result != 'success' }}; then exit 1; fi
|
||||
|
||||
18
.github/workflows/nextcloud-psalm.yml
vendored
18
.github/workflows/nextcloud-psalm.yml
vendored
@@ -41,18 +41,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build filters
|
||||
id: build-filters
|
||||
run: |
|
||||
echo "yaml<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "src:" >> $GITHUB_OUTPUT
|
||||
echo '${{ inputs.path-filters }}' | sed 's/^/ /' >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
filters: ${{ steps.build-filters.outputs.yaml }}
|
||||
|
||||
matrix:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
outputs:
|
||||
ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }}
|
||||
steps:
|
||||
@@ -65,7 +71,7 @@ jobs:
|
||||
static-analysis:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [changes, matrix]
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson(needs.matrix.outputs.ocp-matrix) }}
|
||||
@@ -104,4 +110,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.static-analysis.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src == 'true' && needs.static-analysis.result != 'success' }}; then exit 1; fi
|
||||
|
||||
16
.github/workflows/nextcloud-vitest.yml
vendored
16
.github/workflows/nextcloud-vitest.yml
vendored
@@ -47,18 +47,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build filters
|
||||
id: build-filters
|
||||
run: |
|
||||
echo "yaml<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "src:" >> $GITHUB_OUTPUT
|
||||
echo '${{ inputs.path-filters }}' | sed 's/^/ /' >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
${{ inputs.path-filters }}
|
||||
filters: ${{ steps.build-filters.outputs.yaml }}
|
||||
|
||||
vitest:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
if: needs.changes.outputs.src == 'true'
|
||||
|
||||
name: Vitest
|
||||
|
||||
@@ -109,4 +115,4 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.vitest.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src == 'true' && needs.vitest.result != 'success' }}; then exit 1; fi
|
||||
|
||||
Reference in New Issue
Block a user