docs: add role index to toctree
This commit is contained in:
		
							parent
							
								
									d3f9b0ca86
								
							
						
					
					
						commit
						9365d38162
					
				
							
								
								
									
										5
									
								
								.github/workflows/docs.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/docs.yml
									
									
									
									
										vendored
									
									
								
							@ -51,7 +51,10 @@ jobs:
 | 
				
			|||||||
          mkdir -p ./docs/plugins ./docs/roles
 | 
					          mkdir -p ./docs/plugins ./docs/roles
 | 
				
			||||||
          cat ./docs/roles.rst.template > ./docs/roles/index.rst
 | 
					          cat ./docs/roles.rst.template > ./docs/roles/index.rst
 | 
				
			||||||
          antsibull-docs collection --use-current --squash-hierarchy --dest-dir docs/plugins  middleware_automation.keycloak
 | 
					          antsibull-docs collection --use-current --squash-hierarchy --dest-dir docs/plugins  middleware_automation.keycloak
 | 
				
			||||||
          for role_readme in roles/*/README.md; do ln -f -s ../../$role_readme ./docs/roles/$(basename $(dirname $role_readme)).md; echo " * :doc:\`$(basename $(dirname $role_readme))\`" >> ./docs/roles/index.rst; done
 | 
					          for role_readme in roles/*/README.md; do
 | 
				
			||||||
 | 
					            ln -f -s ../../$role_readme ./docs/roles/$(basename $(dirname $role_readme)).md
 | 
				
			||||||
 | 
					            echo "    $(basename $(dirname $role_readme))" >> ./docs/roles/index.rst
 | 
				
			||||||
 | 
					          done
 | 
				
			||||||
        working-directory: ansible_collections/middleware_automation/keycloak
 | 
					        working-directory: ansible_collections/middleware_automation/keycloak
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Scan PR merges from latest tag
 | 
					      - name: Scan PR merges from latest tag
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										13
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							@ -17,32 +17,40 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout code
 | 
					      - name: Checkout code
 | 
				
			||||||
        uses: actions/checkout@v2
 | 
					        uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Fetch tags
 | 
					      - name: Fetch tags
 | 
				
			||||||
        run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
 | 
					        run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Set up Python
 | 
					      - name: Set up Python
 | 
				
			||||||
        uses: actions/setup-python@v1
 | 
					        uses: actions/setup-python@v1
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          python-version: "3.x"
 | 
					          python-version: "3.x"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Get current version
 | 
					      - name: Get current version
 | 
				
			||||||
        id: get_version
 | 
					        id: get_version
 | 
				
			||||||
        run: echo "::set-output name=TAG_VERSION::$(grep version galaxy.yml | awk -F'"' '{ print $2 }')"
 | 
					        run: echo "::set-output name=TAG_VERSION::$(grep version galaxy.yml | awk -F'"' '{ print $2 }')"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Check if tag exists
 | 
					      - name: Check if tag exists
 | 
				
			||||||
        id: check_tag
 | 
					        id: check_tag
 | 
				
			||||||
        run: echo "::set-output name=TAG_EXISTS::$(git tag | grep ${{ steps.get_version.outputs.TAG_VERSION }})"
 | 
					        run: echo "::set-output name=TAG_EXISTS::$(git tag | grep ${{ steps.get_version.outputs.TAG_VERSION }})"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Fail if tag exists
 | 
					      - name: Fail if tag exists
 | 
				
			||||||
        if: ${{ steps.get_version.outputs.TAG_VERSION == steps.check_tag.outputs.TAG_EXISTS }}
 | 
					        if: ${{ steps.get_version.outputs.TAG_VERSION == steps.check_tag.outputs.TAG_EXISTS }}
 | 
				
			||||||
        uses: actions/github-script@v3
 | 
					        uses: actions/github-script@v3
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          script: |
 | 
					          script: |
 | 
				
			||||||
              core.setFailed('Release tag already exists')
 | 
					              core.setFailed('Release tag already exists')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install dependencies
 | 
					      - name: Install dependencies
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          python -m pip install --upgrade pip
 | 
					          python -m pip install --upgrade pip
 | 
				
			||||||
          pip install ansible-core antsibull
 | 
					          pip install ansible-core antsibull
 | 
				
			||||||
          sudo apt install -y sed hub
 | 
					          sudo apt install -y sed hub
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Build collection
 | 
					      - name: Build collection
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          ansible-galaxy collection build .
 | 
					          ansible-galaxy collection build .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Scan PR merges from latest tag
 | 
					      - name: Scan PR merges from latest tag
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          TYPES=("minor_changes" "major_changes" "bugfixes" "deprecated_features" "removed_features" "breaking_changes")
 | 
					          TYPES=("minor_changes" "major_changes" "bugfixes" "deprecated_features" "removed_features" "breaking_changes")
 | 
				
			||||||
@ -63,6 +71,7 @@ jobs:
 | 
				
			|||||||
          antsibull-changelog release
 | 
					          antsibull-changelog release
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
					          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Commit changelogs
 | 
					      - name: Commit changelogs
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          git config user.name github-actions
 | 
					          git config user.name github-actions
 | 
				
			||||||
@ -70,17 +79,20 @@ jobs:
 | 
				
			|||||||
          git add CHANGELOG.rst changelogs/changelog.yaml
 | 
					          git add CHANGELOG.rst changelogs/changelog.yaml
 | 
				
			||||||
          git commit -m "Update changelog for release ${{ steps.get_version.outputs.TAG_VERSION }}" || true
 | 
					          git commit -m "Update changelog for release ${{ steps.get_version.outputs.TAG_VERSION }}" || true
 | 
				
			||||||
          git push origin
 | 
					          git push origin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Publish collection
 | 
					      - name: Publish collection
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
 | 
					          ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          ansible-galaxy collection publish *.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY
 | 
					          ansible-galaxy collection publish *.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Create release tag
 | 
					      - name: Create release tag
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          git config user.name github-actions
 | 
					          git config user.name github-actions
 | 
				
			||||||
          git config user.email github-actions@github.com
 | 
					          git config user.email github-actions@github.com
 | 
				
			||||||
          git tag -a ${{ steps.get_version.outputs.TAG_VERSION }}" -m "Release v${{ steps.get_version.outputs.TAG_VERSION }}" || true
 | 
					          git tag -a ${{ steps.get_version.outputs.TAG_VERSION }}" -m "Release v${{ steps.get_version.outputs.TAG_VERSION }}" || true
 | 
				
			||||||
          git push origin --tags
 | 
					          git push origin --tags
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Publish Release
 | 
					      - name: Publish Release
 | 
				
			||||||
        uses: softprops/action-gh-release@v1
 | 
					        uses: softprops/action-gh-release@v1
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
@ -88,6 +100,7 @@ jobs:
 | 
				
			|||||||
        with:
 | 
					        with:
 | 
				
			||||||
          files: "*.tar.gz"
 | 
					          files: "*.tar.gz"
 | 
				
			||||||
          body: "Release v${{ steps.get_version.outputs.TAG_VERSION }}"
 | 
					          body: "Release v${{ steps.get_version.outputs.TAG_VERSION }}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  dispatch:
 | 
					  dispatch:
 | 
				
			||||||
    needs: release
 | 
					    needs: release
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,4 @@
 | 
				
			|||||||
Role Index
 | 
					Role Index
 | 
				
			||||||
==========
 | 
					==========
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.. toctree::
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user