diff --git a/.github/workflows/doc_sync.yml b/.github/workflows/doc_sync.yml index 34e4690..e2acd82 100644 --- a/.github/workflows/doc_sync.yml +++ b/.github/workflows/doc_sync.yml @@ -2,11 +2,7 @@ # Succeeds if it is. # Fail if not, generates a new version then commits it. -name: Docs synchronization - -permissions: - contents: write - pull-requests: write +name: Docs synchronizer on: pull_request: @@ -17,14 +13,21 @@ jobs: docs-synch: name: Auto-updates docs on pull requests when needed runs-on: ubuntu-latest + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository. + contents: write + steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + - uses: actions/setup-go@v4 with: go-version: '1.21' - - name: Get dependencies run: go mod download + - name: Install tfplugindocs run: go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs - name: Run tfplugindocs @@ -44,7 +47,9 @@ jobs: - name: Commit docs update if: | failure() - run: | - git config user.name "Github Actions docs synchronizer Bot" - git config user.email "actions@github.com" - echo "test commit docs update" + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: auto-update documentations + file_pattern: 'docs/' + commit_user_name: Docs synchronizer Bot + commit_user_email: git-auto-commit-action@gusers.noreply.github.com diff --git a/pkg/resources/cellar/bucket/doc.md b/pkg/resources/cellar/bucket/doc.md index b2e19d8..35a9fce 100644 --- a/pkg/resources/cellar/bucket/doc.md +++ b/pkg/resources/cellar/bucket/doc.md @@ -1,3 +1,3 @@ Manage [Cellar Bucket](https://www.clever-cloud.com/doc/deploy/addon/cellar/) product. -See [product tests specification](https://www.clever-cloud.com/doc/deploy/addon/cellar/). +See [product specification](https://www.clever-cloud.com/doc/deploy/addon/cellar/).