diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dfd02e3c..d8618273 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,32 +4,41 @@ on: branches: - main pull_request: - paths-ignore: - - "**/*.md" permissions: contents: read - concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: + detect-markdown-only: + uses: PostHog/.github/.github/workflows/detect-markdown-only.yml@ec25337d9fae0100622cbfea1bd5bd88284ac10b + permissions: + pull-requests: read + build: + needs: detect-markdown-only name: Build Job runs-on: ubuntu-latest steps: + - name: Complete markdown-only PR check + if: needs.detect-markdown-only.outputs.markdown_only == 'true' + run: echo "Only Markdown files changed; no additional work is required for this check." - name: Git checkout + if: needs.detect-markdown-only.outputs.markdown_only != 'true' uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - name: 'Set up Java 17' + if: needs.detect-markdown-only.outputs.markdown_only != 'true' uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: java-version: '17' distribution: 'temurin' - name: Cache Gradle packages + if: needs.detect-markdown-only.outputs.markdown_only != 'true' uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: | @@ -40,7 +49,9 @@ jobs: ${{ runner.os }}-gradle- - name: Make compile + if: needs.detect-markdown-only.outputs.markdown_only != 'true' run: make compile - name: Make stop + if: needs.detect-markdown-only.outputs.markdown_only != 'true' run: make stop