Skip to content

chore(deps): bump cbor2 from 5.8.0 to 5.9.0 #1901

chore(deps): bump cbor2 from 5.8.0 to 5.9.0

chore(deps): bump cbor2 from 5.8.0 to 5.9.0 #1901

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.setVersion.outputs.environment }}
version: ${{ steps.setVersion.outputs.version }}
services:
postgres:
image: postgres:18
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:8
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Run tests
run: uv run poe test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Set build version
id: setVersion
run: |
VERSION=$(uv tree -d0 | grep -oP 'v\K[0-9]+\.[0-9]+\.[0-9]+')
COMMIT_ID=$(git rev-parse --short HEAD)
if [[ "${{github.event_name}}" == "release" && "${{github.event.action}}" == "published" ]]; then
echo "environment=prod" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
else
echo "environment=dev" >> $GITHUB_OUTPUT
echo "version=$VERSION-git.$COMMIT_ID" >> $GITHUB_OUTPUT
fi
docker:
name: Docker
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set version name
run: |
sed -ri "s#release=\"version\"#release=\"$VERSION\"#g" home/settings/settings.py
env:
VERSION: ${{ needs.test.outputs.version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: he0119/smart-home
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
# platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
deploy_dev:
name: Deploy Dev
runs-on: ubuntu-latest
needs: docker
environment:
name: dev
url: https://smart.dev.hehome.xyz
if: github.event_name != 'pull_request'
steps:
- name: Tailscale
uses: tailscale/github-action@v4
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
- name: Deploy to server
run: tailscale ssh ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} ${{ secrets.DEPLOY_SCRIPT }}
deploy_prod:
name: Deploy Prod
runs-on: ubuntu-latest
needs: docker
environment:
name: prod
url: https://smart.hehome.xyz
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
steps:
- name: Tailscale
uses: tailscale/github-action@v4
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
- name: Deploy to server
run: tailscale ssh ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} ${{ secrets.DEPLOY_SCRIPT }}
sentry_release:
name: Sentry Release
runs-on: ubuntu-latest
needs: deploy_dev
if: github.event_name != 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Create Sentry release
uses: getsentry/action-release@v3
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: ${{ needs.test.outputs.environment }}
version: ${{ needs.test.outputs.version }}