Merge pull request #59 from BrewBlox/dependabot/pip/setuptools-70.0.0 #30
This file contains 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: CI build | |
on: | |
push: | |
branches: ["**"] | |
pull_request: | |
branches: [develop, edge] | |
workflow_dispatch: {} | |
env: | |
DOCKER_IMAGE: ghcr.io/you/your-package | |
jobs: | |
build: | |
if: false | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Get image metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.DOCKER_IMAGE }} | |
- name: ghcr.io login | |
uses: docker/login-action@v3 | |
if: github.event_name != 'pull_request' | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry wheel | |
poetry install | |
- name: Test | |
run: | | |
poetry run pytest | |
poetry run flake8 | |
- name: Build Python dist | |
run: | | |
poetry run invoke dist | |
- name: Build Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 | |
context: . |