chore(main): release 1.12.0 (#59) #378
Workflow file for this run
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: Type check and Build | |
| on: | |
| push: | |
| paths: | |
| - "**.py" | |
| - "**.html" | |
| - "**.yml" | |
| - "uv.lock" | |
| - "Dockerfile" | |
| release: | |
| types: [created] | |
| pull_request: | |
| paths: | |
| - "**.py" | |
| - "**.html" | |
| - "**.yml" | |
| - "uv.lock" | |
| - "Dockerfile" | |
| jobs: | |
| test: | |
| name: Test types | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "0.9.28" | |
| - run: uv sync --all-extras | |
| - name: Type check | |
| run: uv run basedpyright | |
| - name: Install sqlite3 | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y sqlite3 gcc | |
| - name: Check SQLite Alembic Migrations | |
| run: | | |
| uv run alembic -n data_db upgrade heads | |
| uv run alembic -n meta_db upgrade heads | |
| uv run alembic -n data_db check | |
| uv run alembic -n meta_db check | |
| uv run alembic -n data_db downgrade base | |
| uv run alembic -n meta_db downgrade base | |
| uv run alembic -n data_db upgrade heads | |
| uv run alembic -n meta_db upgrade heads | |
| uv run alembic -n data_db check | |
| uv run alembic -n meta_db check | |
| build: | |
| needs: test | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
| - name: Determine API tags | |
| id: vars | |
| run: | | |
| if [ "${{ github.event_name }}" == "release" ]; then | |
| VERSION="${{ github.event.release.tag_name }}" | |
| # Remove leading 'v' if present | |
| VERSION="${VERSION#v}" | |
| MAJOR=$(echo $VERSION | cut -d. -f1) | |
| MINOR=$(echo $VERSION | cut -d. -f2) | |
| PATCH=$(echo $VERSION | cut -d. -f3) | |
| echo "tags=${{ secrets.DOCKER_HUB_USERNAME }}/vvzapi:$VERSION,${{ secrets.DOCKER_HUB_USERNAME }}/vvzapi:$MAJOR.$MINOR,${{ secrets.DOCKER_HUB_USERNAME }}/vvzapi:$MAJOR,${{ secrets.DOCKER_HUB_USERNAME }}/vvzapi:latest" >> $GITHUB_OUTPUT | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| else | |
| echo "tags=${{ secrets.DOCKER_HUB_USERNAME }}/vvzapi:nightly" >> $GITHUB_OUTPUT | |
| github_sha_hash=${{ github.sha }} | |
| echo "version=nightly:${github_sha_hash:0:7}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build and push API | |
| uses: docker/build-push-action@v5 | |
| with: | |
| file: deploy/Dockerfile.api | |
| platforms: linux/amd64 | |
| push: true | |
| tags: ${{ steps.vars.outputs.tags }} | |
| build-args: | | |
| VERSION=${{ steps.vars.outputs.version }} | |
| - name: Determine scraper tags | |
| id: vars-scraper | |
| run: | | |
| if [ "${{ github.event_name }}" == "release" ]; then | |
| VERSION="${{ github.event.release.tag_name }}" | |
| # Remove leading 'v' if present | |
| VERSION="${VERSION#v}" | |
| MAJOR=$(echo $VERSION | cut -d. -f1) | |
| MINOR=$(echo $VERSION | cut -d. -f2) | |
| PATCH=$(echo $VERSION | cut -d. -f3) | |
| echo "tags=${{ secrets.DOCKER_HUB_USERNAME }}/vvzapi-scraper:$VERSION,${{ secrets.DOCKER_HUB_USERNAME }}/vvzapi-scraper:$MAJOR.$MINOR,${{ secrets.DOCKER_HUB_USERNAME }}/vvzapi-scraper:$MAJOR,${{ secrets.DOCKER_HUB_USERNAME }}/vvzapi-scraper:latest" >> $GITHUB_OUTPUT | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| else | |
| echo "tags=${{ secrets.DOCKER_HUB_USERNAME }}/vvzapi-scraper:nightly" >> $GITHUB_OUTPUT | |
| github_sha_hash=${{ github.sha }} | |
| echo "version=nightly:${github_sha_hash:0:7}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build and push scraper | |
| uses: docker/build-push-action@v5 | |
| with: | |
| file: deploy/Dockerfile.scraper | |
| platforms: linux/amd64 | |
| push: true | |
| tags: ${{ steps.vars-scraper.outputs.tags }} | |
| build-args: | | |
| VERSION=${{ steps.vars-scraper.outputs.version }} |