Skip to content

chore(Dockerfile): Remove unnecessary apt dependencies #317

chore(Dockerfile): Remove unnecessary apt dependencies

chore(Dockerfile): Remove unnecessary apt dependencies #317

Workflow file for this run

---
name: CI
# yamllint disable-line rule:truthy
on: [push]
jobs:
pydep:
name: Python dependencies
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: .venv
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-${{ matrix.python-version }}pip-${{ hashFiles('requirements.txt') }}
- name: Create .venv and install pip dependencies
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
pylint:
needs: pydep
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: .venv
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-${{ matrix.python-version }}pip-${{ hashFiles('requirements.txt') }}
- name: Create .venv and install pip dependencies
run: |
make init
source .venv/bin/activate
pip install -r dev-requirements.txt
pip install -r requirements.txt
- name: Lint with pylint
run: |
source .venv/bin/activate
pylint display
pylint notes
ruff-check:
needs: pydep
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: .venv
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-${{ matrix.python-version }}pip-${{ hashFiles('requirements.txt') }}
- name: Create .venv and install pip dependencies
run: |
make init
source .venv/bin/activate
pip install -r dev-requirements.txt
pip install -r requirements.txt
- name: Lint with ruff
run: |
source .venv/bin/activate
ruff check --output-format=github .
ruff-format:
needs: pydep
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: .venv
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-${{ matrix.python-version }}pip-${{ hashFiles('requirements.txt') }}
- name: Create .venv and install pip dependencies
run: |
make init
source .venv/bin/activate
pip install -r dev-requirements.txt
pip install -r requirements.txt
- name: Format with ruff
run: |
source .venv/bin/activate
ruff format --check .
yamllint:
needs: pydep
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: .venv
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-${{ matrix.python-version }}pip-${{ hashFiles('requirements.txt') }}
- name: Create .venv and install pip dependencies
run: |
make init
source .venv/bin/activate
pip install -r dev-requirements.txt
- name: Lint with pylint
run: |
source .venv/bin/activate
yamllint -s .
publish:
runs-on: ubuntu-latest
if: contains(github.ref, 'refs/tags/v')
needs:
- pylint
- ruff-check
- ruff-format
- yamllint
permissions:
contents: read
packages: write
env:
PLATFORMS: linux/arm64
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- uses: actions/checkout@v4
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# For default priorities, see
# https:/docker/metadata-action/blob/8d56fe93cf3fd680736a906389438c1ed74d75f7/src/tag.ts#L43
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}},priority=10000
type=semver,pattern={{major}}.{{minor}}
type=sha,priority=9000
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ env.PLATFORMS }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to the GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
platforms: ${{ env.PLATFORMS }}
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}