diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88385df1..024a37bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -123,19 +123,12 @@ jobs: - name: Retrieve Repository Docker metadata id: docker_meta - uses: crazy-max/ghaction-docker-meta@v5.0.0 + uses: docker/metadata-action@v5 with: images: ${{ env.DEFAULT_DOCKER_IMAGE }} labels: | org.opencontainers.image.url=https://nicolargo.github.io/glances/ - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.NODE_ENV }}-${{ matrix.os }}-${{ matrix.tag.tag }} - restore-keys: ${{ runner.os }}-buildx-${{ env.NODE_ENV }}-${{ matrix.os }} - - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: @@ -166,5 +159,7 @@ jobs: platforms: ${{ matrix.os != 'ubuntu' && env.DOCKER_PLATFORMS || env.DOCKER_PLATFORMS_UBUNTU }} target: ${{ matrix.tag.target }} labels: ${{ steps.docker_meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache,mode=max + # GHA default behaviour overwrites last build cache. Causes alpine and ubuntu cache to overwrite each other. + # Use `scope` with the os name to prevent that + cache-from: 'type=gha,scope=${{ matrix.os }}' + cache-to: 'type=gha,mode=max,scope=${{ matrix.os }}' diff --git a/docker-requirements.txt b/docker-requirements.txt index feac4040..d73baf4f 100644 --- a/docker-requirements.txt +++ b/docker-requirements.txt @@ -1,9 +1,8 @@ # install with base requirements file -r requirements.txt -docker>=6.1.1; python_version >= "3.7" -packaging; python_version >= "3.7" -podman; python_version >= "3.6" +docker>=6.1.1 +podman python-dateutil requests six diff --git a/optional-requirements.txt b/optional-requirements.txt index d9d86a1b..13089cdc 100644 --- a/optional-requirements.txt +++ b/optional-requirements.txt @@ -7,35 +7,32 @@ cassandra-driver chevron docker>=6.1.1 elasticsearch -fastapi; python_version >= "3.8" +fastapi graphitesender hddtemp influxdb>=1.0.0 # For InfluxDB < 1.8 -influxdb-client; python_version >= "3.7" # For InfluxDB >= 1.8 +influxdb-client # For InfluxDB >= 1.8 jinja2 kafka-python netifaces -nvidia-ml-py; python_version >= "3.5" -packaging; python_version >= "3.7" +nvidia-ml-py paho-mqtt pika -podman; python_version >= "3.6" +podman potsdb prometheus_client pycouchdb pydantic pygal pymdstat -pymongo; python_version >= "3.7" +pymongo pySMART.smartx -pysnmp-lextudio; python_version >= "3.7" +pysnmp-lextudio python-dateutil pyzmq requests -scandir; python_version < "3.5" six sparklines statsd -uvicorn; python_version >= "3.8" -wifi +uvicorn zeroconf==0.131.0 # Waiting correction for ARMv7: https://github.com/python-zeroconf/python-zeroconf/issues/1372 diff --git a/pyproject.toml b/pyproject.toml index c5fb7e4a..6dac1fbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,3 @@ -[tool.black] -line-length = 120 -skip-string-normalization = true -exclude = '\./glances/outputs/static/*' - [tool.ruff] line-length = 120 target-version = "py38"