Refactor: Domain and DTO models #171
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: Godoc | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| paths: | |
| - "**/*.go" | |
| - "go.mod" | |
| - "go.sum" | |
| - ".github/workflows/godoc.yaml" | |
| jobs: | |
| build: | |
| name: PR Preview | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.24.3 | |
| - name: Generate comment | |
| id: generate_comment | |
| run: | | |
| set -x | |
| version=$(go mod download --json $REPO@$REV | jq -r .Version) | |
| echo "Module version: $version" | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| link="https://godocs.io/$REPO@$version" | |
| comment="### godoc reference preview ready ✨<br>[]($link)" | |
| echo "comment=$comment" >> "$GITHUB_OUTPUT" | |
| env: | |
| REPO: github.com/${{ github.event.pull_request.base.repo.full_name }} | |
| REV: ${{ github.event.pull_request.head.sha }} | |
| - name: Find existing comment | |
| uses: peter-evans/find-comment@v4 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: "github-actions[bot]" | |
| body-includes: "### godoc reference preview ready ✨" | |
| - name: Create comment | |
| if: steps.fc.outputs.comment-id == '' | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: ${{ steps.generate_comment.outputs.comment }} | |
| - name: Update comment | |
| if: steps.fc.outputs.comment-id != '' | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| body: ${{ steps.generate_comment.outputs.comment }} | |
| edit-mode: replace |