mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-08 17:51:20 +02:00
add paths-filter
This commit is contained in:
parent
07f30a0df1
commit
a1ad3acfcb
37
.github/config/.files.yaml
vendored
Normal file
37
.github/config/.files.yaml
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
build: &build
|
||||||
|
- build.gradle
|
||||||
|
- app/core/build.gradle
|
||||||
|
- app/common/build.gradle
|
||||||
|
- app/proprietary/build.gradle
|
||||||
|
|
||||||
|
app: &app
|
||||||
|
- app/core/src/main/java/**
|
||||||
|
- app/common/src/main/java/**
|
||||||
|
- app/proprietary/src/main/java/**
|
||||||
|
|
||||||
|
openapi: &openapi
|
||||||
|
- build.gradle
|
||||||
|
- app/core/build.gradle
|
||||||
|
- app/core/src/main/java/**
|
||||||
|
- app/common/build.gradle
|
||||||
|
- app/common/src/main/java/**
|
||||||
|
- app/proprietary/build.gradle
|
||||||
|
- app/proprietary/src/main/java/**
|
||||||
|
|
||||||
|
project: &project
|
||||||
|
- app/**
|
||||||
|
- exampleYmlFiles/**
|
||||||
|
- gradle/**
|
||||||
|
- libs/**
|
||||||
|
- scripts/**
|
||||||
|
- testing/**
|
||||||
|
- build.gradle
|
||||||
|
- Dockerfile
|
||||||
|
- Dockerfile.fat
|
||||||
|
- Dockerfile.ultra-lite
|
||||||
|
- gradle.properties
|
||||||
|
- gradlew
|
||||||
|
- gradlew.bat
|
||||||
|
- lauch4jConfig.xml
|
||||||
|
- launch4jConfig.xml
|
||||||
|
- settings.gradle
|
55
.github/workflows/build.yml
vendored
55
.github/workflows/build.yml
vendored
@ -102,20 +102,32 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
|
- name: Filter for integration changes
|
||||||
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||||
|
id: files
|
||||||
|
with:
|
||||||
|
filters: ".github/config/.files.yaml"
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
|
if: ${{ steps.files.outputs.openapi == 'true' }}
|
||||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||||
with:
|
with:
|
||||||
java-version: "17"
|
java-version: "17"
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
|
|
||||||
- uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
- name: Setup Gradle
|
||||||
|
if: ${{ steps.files.outputs.openapi == 'true' }}
|
||||||
|
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||||
|
|
||||||
- name: Generate OpenAPI documentation
|
- name: Generate OpenAPI documentation
|
||||||
|
if: ${{ steps.files.outputs.openapi == 'true' }}
|
||||||
run: ./gradlew :stirling-pdf:generateOpenApiDocs
|
run: ./gradlew :stirling-pdf:generateOpenApiDocs
|
||||||
|
|
||||||
- name: Upload OpenAPI Documentation
|
- name: Upload OpenAPI Documentation
|
||||||
|
if: ${{ steps.files.outputs.openapi == 'true' }}
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: openapi-docs
|
name: openapi-docs
|
||||||
@ -133,13 +145,21 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
|
- name: Filter for integration changes
|
||||||
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||||
|
id: files
|
||||||
|
with:
|
||||||
|
filters: ".github/config/.files.yaml"
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
|
if: ${{ steps.files.outputs.build == 'true' }}
|
||||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||||
with:
|
with:
|
||||||
java-version: "17"
|
java-version: "17"
|
||||||
distribution: "adopt"
|
distribution: "adopt"
|
||||||
|
|
||||||
- name: check the licenses for compatibility
|
- name: check the licenses for compatibility
|
||||||
|
if: ${{ steps.files.outputs.build == 'true' }}
|
||||||
run: ./gradlew clean checkLicense
|
run: ./gradlew clean checkLicense
|
||||||
|
|
||||||
- name: FAILED - check the licenses for compatibility
|
- name: FAILED - check the licenses for compatibility
|
||||||
@ -150,6 +170,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
build/reports/dependency-license/dependencies-without-allowed-license.json
|
build/reports/dependency-license/dependencies-without-allowed-license.json
|
||||||
retention-days: 3
|
retention-days: 3
|
||||||
|
if-no-files-found: warn
|
||||||
|
|
||||||
docker-compose-tests:
|
docker-compose-tests:
|
||||||
# if: github.event_name == 'push' && github.ref == 'refs/heads/main' ||
|
# if: github.event_name == 'push' && github.ref == 'refs/heads/main' ||
|
||||||
@ -177,21 +198,31 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
|
- name: Filter for integration changes
|
||||||
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||||
|
id: files
|
||||||
|
with:
|
||||||
|
filters: ".github/config/.files.yaml"
|
||||||
|
|
||||||
- name: Set up Java 17
|
- name: Set up Java 17
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||||
with:
|
with:
|
||||||
java-version: "17"
|
java-version: "17"
|
||||||
distribution: "adopt"
|
distribution: "adopt"
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
||||||
|
|
||||||
- name: Install Docker Compose
|
- name: Install Docker Compose
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
sudo curl -SL "https://github.com/docker/compose/releases/download/v2.37.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
sudo curl -SL "https://github.com/docker/compose/releases/download/v2.37.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||||
sudo chmod +x /usr/local/bin/docker-compose
|
sudo chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
@ -199,10 +230,12 @@ jobs:
|
|||||||
cache-dependency-path: ./testing/cucumber/requirements.txt
|
cache-dependency-path: ./testing/cucumber/requirements.txt
|
||||||
|
|
||||||
- name: Pip requirements
|
- name: Pip requirements
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
pip install --require-hashes -r ./testing/cucumber/requirements.txt
|
pip install --require-hashes -r ./testing/cucumber/requirements.txt
|
||||||
|
|
||||||
- name: Run Docker Compose Tests
|
- name: Run Docker Compose Tests
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./testing/test_webpages.sh
|
chmod +x ./testing/test_webpages.sh
|
||||||
chmod +x ./testing/test.sh
|
chmod +x ./testing/test.sh
|
||||||
@ -223,32 +256,46 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
|
- name: Filter for integration changes
|
||||||
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||||
|
id: files
|
||||||
|
with:
|
||||||
|
filters: ".github/config/.files.yaml"
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||||
with:
|
with:
|
||||||
java-version: "17"
|
java-version: "17"
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
|
|
||||||
- uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
- name: Set up Gradle
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
|
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||||
with:
|
with:
|
||||||
gradle-version: 8.14
|
gradle-version: 8.14
|
||||||
|
|
||||||
- name: Build application
|
- name: Build application
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
run: ./gradlew clean build
|
run: ./gradlew clean build
|
||||||
env:
|
env:
|
||||||
DISABLE_ADDITIONAL_FEATURES: true
|
DISABLE_ADDITIONAL_FEATURES: true
|
||||||
STIRLING_PDF_DESKTOP_UI: false
|
STIRLING_PDF_DESKTOP_UI: false
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
|
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
||||||
|
|
||||||
- name: Build ${{ matrix.docker-rev }}
|
- name: Build ${{ matrix.docker-rev }}
|
||||||
|
if: ${{ steps.files.outputs.project == 'true' }}
|
||||||
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
||||||
with:
|
with:
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
|
Loading…
Reference in New Issue
Block a user