chore(deps): update dependency ty to v0.0.48 #2432
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: Docker Image CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - "main" | |
| tags: | |
| - "v*" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - uses: astral-sh/setup-uv@v8.2.0 | |
| with: | |
| enable-cache: true | |
| - name: Install UI dependencies | |
| run: npm install -g @angular/cli && npm ci --legacy-peer-deps | |
| working-directory: ./ui | |
| - name: Lint UI | |
| run: ng lint | |
| working-directory: ./ui | |
| - name: Build UI | |
| run: ng build --configuration production | |
| working-directory: ./ui | |
| - name: Test UI | |
| run: npm run test | |
| working-directory: ./ui | |
| - name: Install Python dependencies | |
| run: uv sync --all-extras --dev --locked | |
| - name: Lint Python | |
| run: | | |
| uv run ruff check | |
| uv run ruff format --check | |
| uv run ty check | |
| - name: Run Python tests | |
| run: uv run -m unittest discover -s ./tests | |
| - name: Build distribution | |
| run: | | |
| echo -n ${{ github.sha }} > version | |
| tar --exclude ./pvcontrol/__pycache__ -zcv -f pv-control.tar.gz ./pvcontrol/ ./ui/dist/ui/ pyproject.toml uv.lock *.md LICENSE version pvcontrol.nginx pvcontrol.service | |
| - name: Archive distribution | |
| uses: actions/upload-artifact@v7 | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| name: pv-control.tar.gz | |
| path: pv-control.tar.gz | |
| - name: Upload release distribution | |
| uses: softprops/action-gh-release@v3 | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| with: | |
| files: pv-control.tar.gz | |
| - name: Docker meta | |
| id: docker_meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ github.repository }} | |
| tags: | | |
| type=schedule | |
| type=ref,event=pr | |
| type=ref,event=branch | |
| type=ref,event=tag | |
| type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push multi-arch docker image (amd64 + arm64) | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.docker_meta.outputs.tags }} | |
| labels: ${{ steps.docker_meta.outputs.labels }} | |
| build-args: | | |
| VCS_REF=${{ github.sha }} | |
| # cache-from: type=gha,scope=pv-control | |
| # cache-to: type=gha,mode=max,scope=pv-control | |
| build-armv7: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build linux/arm/v7 (no push) | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| platforms: linux/arm/v7 | |
| push: false | |
| build-args: | | |
| VCS_REF=${{ github.sha }} | |
| # cache-from: type=gha,scope=pv-control-armv7 | |
| # cache-to: type=gha,mode=max,scope=pv-control-armv7 |