Skip to content

ci: conditional execution of composite actions #14

ci: conditional execution of composite actions

ci: conditional execution of composite actions #14

Workflow file for this run

name: Validate docs
on:
workflow_call:
pull_request:
# If not specified, types includes by default [opened, reopened, synchronize]
# This next line should be used in conjunction with the if statement that prevents CI jobs to run on draft PRs.
# ready_for_review is then added to make sure that a PR with no code change triggers CI if it's no longer a draft PR.
types: [ opened, reopened, synchronize, ready_for_review ]
permissions:
contents: read
jobs:
validate:
name: Validate docs
# Preventing a job from running on draft PRs.
if: '! github.event.pull_request.draft'
runs-on: "ubuntu-latest"
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Detect changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'docs/**'
- '/README.md'
- name: docs ci action
if: steps.filter.outputs.docs == 'true'
uses: ./.github/actions/docs-ci-action