# this workflow runs the remote validate bake target from docker/docs to check
# if yaml reference docs and markdown files used in this repo are still valid
# https://github.com/docker/docker.github.io/blob/98c7c9535063ae4cd2cd0a31478a21d16d2f07a3/docker-bake.hcl#L34-L36
name: docs-upstream

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

on:
  push:
    branches:
      - 'master'
      - 'v[0-9]*'
    paths:
      - '.github/workflows/docs-upstream.yml'
      - 'docs/buildkitd.toml.md'
      - 'docs/attestations/slsa-definitions.md'
      - 'docs/attestations/attestation-storage.md'
      - 'frontend/dockerfile/docs/reference.md'
      - 'frontend/dockerfile/docs/rules/**'
  pull_request:
    paths:
      - '.github/workflows/docs-upstream.yml'
      - 'docs/buildkitd.toml.md'
      - 'docs/attestations/slsa-definitions.md'
      - 'docs/attestations/attestation-storage.md'
      - 'frontend/dockerfile/docs/reference.md'
      - 'frontend/dockerfile/docs/rules/**'

jobs:
  validate:
    uses: docker/docs/.github/workflows/validate-upstream.yml@main
    with:
      module-name: moby/buildkit
