Merge pull request #2795 from dvdksn/bake-docs-call-check #736
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this workflow runs the remote validate bake target from docker/docker.github.io | |
# 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 | |
# Default to 'contents: read', which grants actions to read commits. | |
# | |
# If any permission is set, any permission not included in the list is | |
# implicitly set to "none". | |
# | |
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'v[0-9]*' | |
paths: | |
- '.github/workflows/docs-upstream.yml' | |
- 'docs/**' | |
pull_request: | |
paths: | |
- '.github/workflows/docs-upstream.yml' | |
- 'docs/**' | |
jobs: | |
docs-yaml: | |
runs-on: ubuntu-24.04 | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
version: latest | |
- | |
name: Build reference YAML docs | |
uses: docker/bake-action@v5 | |
with: | |
targets: update-docs | |
provenance: false | |
set: | | |
*.output=/tmp/buildx-docs | |
*.cache-from=type=gha,scope=docs-yaml | |
*.cache-to=type=gha,scope=docs-yaml,mode=max | |
env: | |
DOCS_FORMATS: yaml | |
- | |
name: Upload reference YAML docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs-yaml | |
path: /tmp/buildx-docs/out/reference | |
retention-days: 1 | |
validate: | |
uses: docker/docs/.github/workflows/validate-upstream.yml@6b73b05acb21edf7995cc5b3c6672d8e314cee7a # pin for artifact v4 support: https://github.com/docker/docs/pull/19220 | |
needs: | |
- docs-yaml | |
with: | |
module-name: docker/buildx | |
data-files-id: docs-yaml | |
data-files-folder: buildx | |
create-placeholder-stubs: true |