Skip to content

Commit 999f01b

Browse files
authored
Merge branch 'main' into python3.13
2 parents 6daff79 + be641d6 commit 999f01b

File tree

16 files changed

+250
-301
lines changed

16 files changed

+250
-301
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Apply single platform tags
2+
description: Download the image tar, load it to Docker and apply tags to it
3+
4+
inputs:
5+
image:
6+
description: Image name
7+
required: true
8+
platform:
9+
description: Image platform
10+
required: true
11+
variant:
12+
description: Variant tag prefix
13+
required: true
14+
15+
runs:
16+
using: composite
17+
steps:
18+
- name: Load image to Docker 📥
19+
uses: ./.github/actions/load-image
20+
with:
21+
image: ${{ inputs.image }}
22+
platform: ${{ inputs.platform }}
23+
variant: ${{ inputs.variant }}
24+
25+
- name: Download tags file 📥
26+
uses: actions/download-artifact@v4
27+
with:
28+
name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}-tags
29+
path: /tmp/jupyter/tags/
30+
31+
- name: Apply tags to the loaded image 🏷
32+
run: |
33+
python3 -m tagging.apps.apply_tags \
34+
--registry ${{ env.REGISTRY }} \
35+
--owner ${{ env.OWNER }} \
36+
--image ${{ inputs.image }} \
37+
--variant ${{ inputs.variant }} \
38+
--platform ${{ inputs.platform }} \
39+
--tags-dir /tmp/jupyter/tags/
40+
shell: bash
41+
42+
# This step is needed to prevent pushing non-multi-arch "latest" tag
43+
- name: Remove the "latest" tag from the image 🗑️
44+
run: docker image rmi ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}:latest
45+
shell: bash
46+
47+
- name: Show Docker images 📦
48+
run: docker image ls --all
49+
shell: bash

.github/actions/load-image/action.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,17 @@ runs:
2020
with:
2121
name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}
2222
path: /tmp/jupyter/images/
23+
2324
- name: Load downloaded image to docker 📥
2425
run: |
25-
zstd --uncompress --stdout --rm /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}.tar.zst | docker load
26-
docker image ls --all
26+
zstd \
27+
--uncompress \
28+
--stdout \
29+
--rm \
30+
/tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}.tar.zst \
31+
| docker load
32+
shell: bash
33+
34+
- name: Show Docker images 📦
35+
run: docker image ls --all
2736
shell: bash

.github/dependabot.yml

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ updates:
99
directory: /
1010
schedule:
1111
interval: weekly
12+
- package-ecosystem: github-actions
13+
directory: .github/actions/apply-single-tags/
14+
schedule:
15+
interval: weekly
1216
- package-ecosystem: github-actions
1317
directory: .github/actions/create-dev-env/
1418
schedule:

.github/workflows/docker-build-test-upload.yml

+31-29
Original file line numberDiff line numberDiff line change
@@ -63,27 +63,27 @@ jobs:
6363
shell: bash
6464

6565
- name: Build image 🛠
66-
run: >
67-
docker build
68-
--rm --force-rm
69-
--tag ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}
70-
images/${{ inputs.image }}/${{ inputs.variant != 'default' && inputs.variant || '.' }}/
71-
--build-arg REGISTRY=${{ env.REGISTRY }}
72-
--build-arg OWNER=${{ env.OWNER }}
66+
run: |
67+
docker build \
68+
--rm --force-rm \
69+
--tag ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }} \
70+
images/${{ inputs.image }}/${{ inputs.variant != 'default' && inputs.variant || '.' }}/ \
71+
--build-arg REGISTRY=${{ env.REGISTRY }} \
72+
--build-arg OWNER=${{ env.OWNER }}
7373
env:
7474
DOCKER_BUILDKIT: 1
7575
# Full logs for CI build
7676
BUILDKIT_PROGRESS: plain
7777
shell: bash
7878

7979
- name: Write tags file 🏷
80-
run: >
81-
python3 -m tagging.apps.write_tags_file
82-
--registry ${{ env.REGISTRY }}
83-
--owner ${{ env.OWNER }}
84-
--image ${{ inputs.image }}
85-
--variant ${{ inputs.variant }}
86-
--tags-dir /tmp/jupyter/tags/
80+
run: |
81+
python3 -m tagging.apps.write_tags_file \
82+
--registry ${{ env.REGISTRY }} \
83+
--owner ${{ env.OWNER }} \
84+
--image ${{ inputs.image }} \
85+
--variant ${{ inputs.variant }} \
86+
--tags-dir /tmp/jupyter/tags/
8787
shell: bash
8888
- name: Upload tags file 💾
8989
uses: actions/upload-artifact@v4
@@ -93,15 +93,15 @@ jobs:
9393
retention-days: 3
9494

9595
- name: Write manifest and build history file 🏷
96-
run: >
97-
python3 -m tagging.apps.write_manifest
98-
--registry ${{ env.REGISTRY }}
99-
--owner ${{ env.OWNER }}
100-
--image ${{ inputs.image }}
101-
--variant ${{ inputs.variant }}
102-
--hist-lines-dir /tmp/jupyter/hist_lines/
103-
--manifests-dir /tmp/jupyter/manifests/
104-
--repository ${{ github.repository }}
96+
run: |
97+
python3 -m tagging.apps.write_manifest \
98+
--registry ${{ env.REGISTRY }} \
99+
--owner ${{ env.OWNER }} \
100+
--image ${{ inputs.image }} \
101+
--variant ${{ inputs.variant }} \
102+
--hist-lines-dir /tmp/jupyter/hist_lines/ \
103+
--manifests-dir /tmp/jupyter/manifests/ \
104+
--repository ${{ github.repository }}
105105
shell: bash
106106
- name: Upload manifest file 💾
107107
uses: actions/upload-artifact@v4
@@ -119,7 +119,9 @@ jobs:
119119
- name: Save image as a tar for later use 💾
120120
run: |
121121
mkdir -p /tmp/jupyter/images/
122-
docker save ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }} | zstd > /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}.tar.zst
122+
docker save \
123+
${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }} \
124+
| zstd > /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}.tar.zst
123125
shell: bash
124126
- name: Upload image as artifact 💾
125127
uses: actions/upload-artifact@v4
@@ -130,9 +132,9 @@ jobs:
130132
compression-level: 0
131133

132134
- name: Run tests ✅
133-
run: >
134-
python3 -m tests.run_tests
135-
--registry ${{ env.REGISTRY }}
136-
--owner ${{ env.OWNER }}
137-
--image ${{ inputs.image }}
135+
run: |
136+
python3 -m tests.run_tests \
137+
--registry ${{ env.REGISTRY }} \
138+
--owner ${{ env.OWNER }} \
139+
--image ${{ inputs.image }}
138140
shell: bash

.github/workflows/docker-merge-tags.yml

-75
This file was deleted.

.github/workflows/docker-tag-push.yml

+25-28
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,13 @@ on:
1212
description: Image name
1313
required: true
1414
type: string
15-
platform:
16-
description: Image platform
17-
required: true
18-
type: string
1915
variant:
2016
description: Variant tag prefix
2117
required: true
2218
type: string
2319
timeout-minutes:
2420
description: Timeout in minutes
25-
default: 25
21+
default: 15
2622
type: number
2723
secrets:
2824
REGISTRY_USERNAME:
@@ -40,12 +36,21 @@ jobs:
4036
uses: actions/checkout@v4
4137
- name: Create dev environment 📦
4238
uses: ./.github/actions/create-dev-env
43-
- name: Load image to Docker 📥
44-
uses: ./.github/actions/load-image
39+
40+
- name: Download aarch64 image tar and apply tags 🏷
41+
uses: ./.github/actions/apply-single-tags
4542
with:
4643
image: ${{ inputs.image }}
47-
platform: ${{ inputs.platform }}
4844
variant: ${{ inputs.variant }}
45+
platform: aarch64
46+
if: ${{ !contains(inputs.variant, 'cuda') }}
47+
48+
- name: Download x86_64 image tar and apply tags 🏷
49+
uses: ./.github/actions/apply-single-tags
50+
with:
51+
image: ${{ inputs.image }}
52+
variant: ${{ inputs.variant }}
53+
platform: x86_64
4954

5055
- name: Login to Registry 🔐
5156
if: env.PUSH_TO_REGISTRY == 'true'
@@ -55,25 +60,17 @@ jobs:
5560
username: ${{ secrets.REGISTRY_USERNAME }}
5661
password: ${{ secrets.REGISTRY_TOKEN }}
5762

58-
- name: Download tags file 📥
59-
uses: actions/download-artifact@v4
60-
with:
61-
name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}-tags
62-
path: /tmp/jupyter/tags/
63-
- name: Apply tags to the loaded image 🏷
64-
run: >
65-
python3 -m tagging.apps.apply_tags
66-
--registry ${{ env.REGISTRY }}
67-
--owner ${{ env.OWNER }}
68-
--image ${{ inputs.image }}
69-
--variant ${{ inputs.variant }}
70-
--platform ${{ inputs.platform }}
71-
--tags-dir /tmp/jupyter/tags/
72-
# This step is needed to prevent pushing non-multi-arch "latest" tag
73-
- name: Remove the "latest" tag from the image 🗑️
74-
run: docker image rmi ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}:latest
75-
76-
- name: Push Images to Registry 📤
63+
- name: Push single platform images to Registry 📤
7764
if: env.PUSH_TO_REGISTRY == 'true'
78-
run: docker push --all-tags ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}
65+
run: |
66+
docker push --all-tags ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }} || \
67+
docker push --all-tags ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}
68+
shell: bash
69+
70+
- name: Merge tags for the images 🔀
71+
run: |
72+
python3 -m tagging.apps.merge_tags \
73+
--image ${{ inputs.image }} \
74+
--variant ${{ inputs.variant }} \
75+
--tags-dir /tmp/jupyter/tags/
7976
shell: bash

.github/workflows/docker-wiki-update.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ jobs:
4040
path: wiki_src/
4141

4242
- name: Update wiki 🏷
43-
run: >
44-
python3 -m wiki.update_wiki
45-
--wiki-dir wiki_src/
46-
--hist-lines-dir /tmp/jupyter/hist_lines/
47-
--manifests-dir /tmp/jupyter/manifests/
48-
--repository ${{ github.repository }}
43+
run: |
44+
python3 -m wiki.update_wiki \
45+
--wiki-dir wiki_src/ \
46+
--hist-lines-dir /tmp/jupyter/hist_lines/ \
47+
--manifests-dir /tmp/jupyter/manifests/ \
48+
--repository ${{ github.repository }}
4949
shell: bash
5050

5151
- name: Push Wiki to GitHub 📤

0 commit comments

Comments
 (0)