Merge pull request #276 from homarr-labs/renovate/ghcr.io-homarr-labs… #209
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: Sync Helm Chart Docs to Homarr documentation Repo | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| jobs: | |
| sync-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout helm chart Repo | |
| uses: actions/checkout@v7 | |
| with: | |
| sparse-checkout: | | |
| charts/homarr/README.md | |
| sparse-checkout-cone-mode: false | |
| - name: Obtain token | |
| id: obtainToken | |
| uses: tibdex/github-app-token@v2 | |
| with: | |
| private_key: ${{ secrets.HOMARR_DOCS_SYNC_APP_PRIVATE_KEY }} | |
| app_id: ${{ vars.HOMARR_DOCS_SYNC_APP_ID }} | |
| installation_retrieval_mode: repository | |
| installation_retrieval_payload: homarr-labs/homarr | |
| - name: Checkout Homarr docs | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: homarr-labs/homarr | |
| path: target-repo | |
| token: ${{ steps.obtainToken.outputs.token }} | |
| ref: main | |
| - name: Sync Documentation | |
| run: | | |
| DEST="target-repo/apps/docs/docs/getting-started/installation" | |
| mkdir -p "$DEST" | |
| cp charts/homarr/README.md "$DEST/helm.md" | |
| sed -i '1s/# Homarr/# Helm/' "$DEST/helm.md" | |
| cd target-repo | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git commit -m "docs(helm): update chart installation page" || echo "No changes to commit" | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v8 | |
| id: cpr | |
| with: | |
| token: ${{ steps.obtainToken.outputs.token }} | |
| branch: docs/update-helm-docs | |
| base: main | |
| title: "docs(helm): update chart installation page" | |
| delete-branch: true | |
| path: target-repo | |
| body: | | |
| This PR updates the documentation file to match the latest Helm chart changes. | |
| labels: | | |
| helm | |
| docs | |
| - name: Enable Pull Request Automerge | |
| if: steps.cpr.outputs.pull-request-operation == 'created' | |
| run: gh pr merge --merge --auto "${{ steps.cpr.outputs.pull-request-number }}" --repo https://github.com/homarr-labs/homarr | |
| env: | |
| GH_TOKEN: ${{ steps.obtainToken.outputs.token }} |