cnpg-docs-release #8
This file contains hidden or 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
| name: Import CloudNativePG Docs | |
| on: | |
| repository_dispatch: | |
| types: [cnpg-docs-release] | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'The tag of the CloudNativePG release to import docs for' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| import: | |
| runs-on: ubuntu-latest | |
| env: | |
| VERSION: ${{ github.event.client_payload.tag || github.event.inputs.tag }} | |
| steps: | |
| - name: Checkout docs repo | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Import docs | |
| run: | | |
| echo "Importing CloudNativePG docs for version: ${{ env.VERSION }}" | |
| ./scripts/import_docs.sh "${{ env.VERSION }}" | |
| - name: Commit and push changes | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| message: "docs: import CloudNativePG ${{ env.VERSION }}" | |
| # The token is required to trigger build_containers on pushes | |
| github_token: '${{ secrets.REPO_PAT }}' |