Merge pull request #1 from kgdn/dependabot/pip/aiomysql-0.3.0 #2
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: Deploy to Docker Hub | |
| on: | |
| push: | |
| branches: ["main"] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5.1.0 | |
| - name: Install dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip install ruff | |
| - name: Lint with ruff | |
| run: | | |
| ruff check . | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| - name: Docker Setup Buildx | |
| uses: docker/setup-buildx-action@v3.3.0 | |
| with: | |
| install: true | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2.2.0 | |
| - name: Log in to Docker Hub | |
| run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | |
| - name: Build and push multi-platform Docker image | |
| run: | | |
| docker buildx create --use | |
| docker buildx build --platform linux/amd64,linux/arm64 \ | |
| --file Dockerfile \ | |
| --tag kgdn/kinematica:${{ github.sha }} \ | |
| --tag kgdn/kinematica:latest \ | |
| --push . | |
| - name: Log out from Docker Hub | |
| run: docker logout |