Skip to content

chore(deps): update ubuntu:20.04 docker digest to 874aca5 (#30) #9

chore(deps): update ubuntu:20.04 docker digest to 874aca5 (#30)

chore(deps): update ubuntu:20.04 docker digest to 874aca5 (#30) #9

Workflow file for this run

name: Docker image (Python)
on:
push:
branches:
- master
paths:
- 'python.Dockerfile'
- 'python.entrypoint.sh'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
python:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[skip-ci]') }}
strategy:
fail-fast: false
matrix:
python_version: [3.8.18, 3.9.18, 3.10.13, 3.11.7, 3.12.1]
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3
- name: Login to DockerHub
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract first two elements
id: extract
run: |
str="${{ matrix.python_version }}"
IFS='.' read -ra arr <<< "$str"
result="${arr[0]}.${arr[1]}"
echo "::set-output name=result::$result"
- name: Build and push
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5
with:
build-args: |
PYTHON_VERSION=${{ matrix.python_version }}
PYTHON_VERSION_SHORT=${{ steps.extract.outputs.result }}
context: .
file: python.Dockerfile
platforms: linux/amd64, linux/arm64
push: true
tags: "djoh/all-in-one:python${{ steps.extract.outputs.result }}"
cache-from: type=registry,ref=djoh/all-in-one:buildcache_python${{ matrix.python_version }}
cache-to: type=registry,ref=djoh/all-in-one:buildcache_python${{ matrix.python_version }},mode=max