Skip to content

Commit 1bed137

Browse files
committed
build multiple images
1 parent 828a182 commit 1bed137

4 files changed

Lines changed: 68 additions & 19 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: build_all_images
2+
'on':
3+
workflow_call:
4+
inputs:
5+
docker_tag:
6+
required: true
7+
type: string
8+
tag_latest:
9+
required: true
10+
type: boolean
11+
env:
12+
BRANCH_NAME: '${{ github.event.pull_request.head.ref }}'
13+
jobs:
14+
package_base_docker_image:
15+
uses: ./.github/workflows/build_multi_arch_image.yml
16+
with:
17+
tag_latest: ${{ inputs.tag_latest }}
18+
docker_tag: ${{ inputs.docker_tag }}
19+
container_name: base
20+
package_non_base_docker_image:
21+
runs-on: ubuntu-22.04
22+
needs:
23+
- package_base_docker_image
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- container_name: node_24_python_3_14
29+
- container_name: node_24_python_3_13
30+
steps:
31+
- name: build
32+
uses: ./.github/workflows/build_multi_arch_image.yml
33+
with:
34+
tag_latest: ${{ inputs.tag_latest }}
35+
docker_tag: ${{ inputs.docker_tag }}
36+
container_name: ${{ matrix.container_name }}

.github/workflows/pull_request.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,11 @@ jobs:
8484
# echo "commit_id=${{ github.sha }}" >> "$GITHUB_ENV"
8585
echo "commit_id=${{ github.sha }}" >> "$GITHUB_OUTPUT"
8686
echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
87-
package_base_docker_image:
88-
uses: ./.github/workflows/build_multi_arch_image.yml
87+
build_all_images:
8988
needs:
9089
- get_issue_number
9190
- get_commit_id
92-
with:
93-
tag_latest: false
91+
uses: ./.github/workflows/build_all_images.yml
92+
with:
9493
docker_tag: 'pr-${{ needs.get_issue_number.outputs.issue_number }}-${{ needs.get_commit_id.outputs.sha_short }}'
95-
container_name: base
96-
package_node_24_python_3_14_docker_image:
97-
uses: ./.github/workflows/build_multi_arch_image.yml
98-
needs:
99-
- get_issue_number
100-
- get_commit_id
101-
- package_base_docker_image
102-
with:
10394
tag_latest: false
104-
docker_tag: 'pr-${{ needs.get_issue_number.outputs.issue_number }}-${{ needs.get_commit_id.outputs.sha_short }}'
105-
container_name: node_24_python_3_14

.github/workflows/release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ jobs:
3939
branch_name: main
4040
tag_format: ${{ needs.get_asdf_version.outputs.tag_format }}
4141
secrets: inherit
42-
package_docker_image:
42+
build_all_images:
4343
needs: tag_release
44-
uses: ./.github/workflows/build_multi_arch_image.yml
45-
with:
46-
tag_latest: true
44+
uses: ./.github/workflows/build_all_images.yml
45+
with:
4746
docker_tag: '${{ needs.tag_release.outputs.version_tag }}'
48-
container_name: base
47+
tag_latest: true
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
3+
{
4+
"name": "EPS Devcontainer node_24 python_3.13",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"build": {
7+
"dockerfile": "../../common/Dockerfile",
8+
"args": {
9+
"BASE_VERSION": "${localEnv:BASE_VERSION}"
10+
}
11+
},
12+
"runArgs": [
13+
"--network=host"
14+
],
15+
"remoteEnv": { "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" },
16+
"features": {
17+
"ghcr.io/devcontainers/features/node:1": {
18+
"version": "24.13.1"
19+
},
20+
"ghcr.io/devcontainers/features/python:1": {
21+
"version": "3.13.12"
22+
}
23+
}
24+
}
25+

0 commit comments

Comments
 (0)