docs.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Docs
  2. on:
  3. release:
  4. types: [published]
  5. jobs:
  6. open-pr:
  7. runs-on: ubuntu-latest
  8. steps:
  9. -
  10. name: Checkout docs repo
  11. uses: actions/checkout@v3
  12. with:
  13. token: ${{ secrets.GHPAT_DOCS_DISPATCH }}
  14. repository: docker/docker.github.io
  15. ref: master
  16. -
  17. name: Prepare
  18. run: |
  19. rm -rf ./_data/compose-cli/*
  20. -
  21. name: Build
  22. uses: docker/build-push-action@v3
  23. with:
  24. context: ${{ github.server_url }}/${{ github.repository }}.git#${{ github.event.release.name }}
  25. target: docs-reference
  26. outputs: ./_data/compose-cli
  27. -
  28. name: Update compose_version in _config.yml
  29. run: |
  30. sed -i "s|^compose_version\:.*|compose_version\: \"${{ github.event.release.name }}\"|g" _config.yml
  31. cat _config.yml | yq .compose_version
  32. -
  33. name: Commit changes
  34. run: |
  35. git add -A .
  36. -
  37. name: Create PR on docs repo
  38. uses: peter-evans/create-pull-request@923ad837f191474af6b1721408744feb989a4c27 # v4.0.4
  39. with:
  40. token: ${{ secrets.GHPAT_DOCS_DISPATCH }}
  41. push-to-fork: docker-tools-robot/docker.github.io
  42. commit-message: Update Compose reference API to ${{ github.event.release.name }}
  43. signoff: true
  44. branch: dispatch/compose-api-reference-${{ github.event.release.name }}
  45. delete-branch: true
  46. title: Update Compose reference API to ${{ github.event.release.name }}
  47. body: |
  48. Update the Compose reference API documentation to keep in sync with the latest release `${{ github.event.release.name }}`
  49. draft: false