-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 2.19 KB
/
Copy pathdebian-docker.yml
File metadata and controls
73 lines (63 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build debian python docker image
on:
workflow_dispatch:
inputs:
debian_version:
description: 'Debian version to use as base image'
required: true
default: '13.5-slim'
permissions:
contents: read
packages: write
env:
PLATFORMS: linux/amd64,linux/arm64
IMAGE_NAME: python
PYTHON_VERSION: 3.14.5
PYTHON_SHA256: 7e32597b99e5d9a39abed35de4693fa169df3e5850d4c334337ffd6a19a36db6
jobs:
build-and-publish-debian:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
lfs: true
- name: Set lower-case image namespace
id: vars
shell: bash
run: |
echo "owner_lc=${GITHUB_REPOSITORY_OWNER,,}" >> "$GITHUB_OUTPUT"
echo "image_tag=${{ env.PYTHON_VERSION }}-debian-${{ github.event.inputs.debian_version }}" >> "$GITHUB_OUTPUT"
echo "jre_image_tag=${{ env.PYTHON_VERSION }}-debian-${{ github.event.inputs.debian_version }}-jre${{ github.event.inputs.jre_version }}" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
with:
platforms: ${{ env.PLATFORMS }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
with:
platforms: ${{ env.PLATFORMS }}
- name: Log in to GHCR
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
id: build_loader
uses: docker/build-push-action@v7
env:
SOURCE_DATE_EPOCH: 0
with:
context: ./
file: ./Dockerfile.debian
push: true
cache-from: type=gha,scope=debian
cache-to: type=gha,mode=max,scope=debian
platforms: ${{ env.PLATFORMS }}
build-args: |
python_version=${{ env.PYTHON_VERSION }}
python_sha256=${{ env.PYTHON_SHA256 }}
debian_version=${{ github.event.inputs.debian_version }}
tags: |
ghcr.io/${{ steps.vars.outputs.owner_lc }}/${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.image_tag }}