fix: get chart history ability based on dashboard instead of users #874
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: Backend-Converted-Types-Check | |
| on: | |
| push: | |
| paths: | |
| - 'backend/pkg/api/types/**' | |
| - 'frontend/types/api/**' | |
| branches: | |
| - '**' | |
| pull_request: | |
| paths: | |
| - 'backend/pkg/api/types/**' | |
| - 'frontend/types/api/**' | |
| branches: | |
| - '**' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| checks: write | |
| jobs: | |
| build: | |
| name: converted-types-check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'backend/go.mod' | |
| cache-dependency-path: 'backend/go.sum' | |
| cache: true | |
| - name: Check if all backend-types have been converted to frontend-types | |
| working-directory: backend | |
| run: | | |
| currHash=$(find ../frontend/types/api -type f -print0 | sort -z | xargs -0 sha1sum | sha256sum | head -c 64) | |
| make frontend-types | |
| newHash=$(find ../frontend/types/api -type f -print0 | sort -z | xargs -0 sha1sum | sha256sum | head -c 64) | |
| if [ "$currHash" != "$newHash" ]; then | |
| echo "frontend-types have changed, please commit the changes" | |
| exit 1 | |
| fi | |