-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (65 loc) · 2.21 KB
/
Copy pathdebian-java.yml
File metadata and controls
75 lines (65 loc) · 2.21 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
74
75
name: Build debian jre-python docker image
on:
workflow_dispatch:
inputs:
debian_version:
description: 'Debian version to use as base image'
required: true
default: '13.5-slim'
jre_version:
description: 'JRE version to use for JRE image'
required: true
default: '17'
permissions:
contents: read
packages: write
env:
PLATFORMS: linux/amd64,linux/arm64
IMAGE_NAME: python
PYTHON_VERSION: 3.14.5
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 JRE image
id: build_jre_loader
uses: docker/build-push-action@v7
env:
SOURCE_DATE_EPOCH: 0
with:
context: ./
file: ./Dockerfile.debian-jre
push: true
cache-from: type=gha,scope=debian-jre
cache-to: type=gha,mode=max,scope=debian-jre
platforms: ${{ env.PLATFORMS }}
build-args: |
base_debian_tag=${{ steps.vars.outputs.image_tag }}
jre_version=${{ github.event.inputs.jre_version }}
tags: |
ghcr.io/${{ steps.vars.outputs.owner_lc }}/${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.jre_image_tag }}