Skip to content

Commit e968362

Browse files
refactor(ci): combine Gentoo with other docker tests (#1620)
1 parent bf48bd3 commit e968362

File tree

3 files changed

+19
-36
lines changed

3 files changed

+19
-36
lines changed

.github/workflows/validation.yaml

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
dependencies: ${{ steps.filter.outputs.dependencies }}
2323
docker: ${{ steps.filter.outputs.docker }}
2424
docker-files: ${{ steps.filter.outputs.docker_files }}
25-
docker-gentoo: ${{ steps.filter.outputs.docker-gentoo }}
2625
markdown: ${{ steps.filter.outputs.markdown }}
2726
helpers: ${{ steps.filter.outputs.helpers }}
2827
shell: ${{ steps.filter.outputs.shell }}
@@ -417,6 +416,7 @@ jobs:
417416
fail-fast: false
418417
matrix:
419418
include:
419+
- { container: Gentoo, dockerfile: Dockerfile_gentoo }
420420
- { container: Alpine, dockerfile: Dockerfile_alpine }
421421
- { container: Amazon Linux, dockerfile: Dockerfile_amazonlinux }
422422
- { container: Arch, dockerfile: Dockerfile_archlinux }
@@ -438,39 +438,24 @@ jobs:
438438
run: grep 'VERSION\|ID' /etc/os-release && uname -a
439439
- name: Build the ${{ matrix.container }} docker image
440440
if: >-
441-
needs.changes.outputs.ci == 'true' ||
442-
needs.changes.outputs.dependencies == 'true' ||
443-
contains(needs.changes.outputs.docker-files, matrix.dockerfile) ||
444-
needs.changes.outputs.shell == 'true'
445-
uses: docker/build-push-action@v6
446-
timeout-minutes: 100
447-
with:
448-
build-args: NODEBUILDER_VERSION=${{ github.sha || github.head_ref || 'master' }}
449-
context: .
450-
file: docker/${{ matrix.dockerfile }}
451-
452-
run-nodebuilder-gentoo:
453-
name: Docker image for ${{ matrix.container }}
454-
needs: [changes, dockerfile-lint, shell-lint, yaml-lint]
455-
if: >-
456-
needs.changes.outputs.docker-gentoo == 'true' ||
457-
( github.event.action == '' &&
458-
github.event.before == '' &&
459-
github.event.inputs == null )
460-
runs-on: ubuntu-latest
461-
strategy:
462-
matrix:
463-
container: [Gentoo]
464-
include:
465-
- container: Gentoo
466-
dockerfile: Dockerfile_gentoo
467-
steps:
468-
- uses: actions/checkout@v4
469-
- name: Check the current OS version
470-
run: grep 'VERSION\|ID' /etc/os-release && uname -a
471-
- name: Build the ${{ matrix.container }} docker image
472-
timeout-minutes: 200
441+
(
442+
needs.changes.outputs.ci == 'true' ||
443+
needs.changes.outputs.dependencies == 'true' ||
444+
contains(needs.changes.outputs.docker-files, matrix.dockerfile) ||
445+
needs.changes.outputs.shell == 'true'
446+
)
447+
&&
448+
(
449+
matrix.container != 'Gentoo' ||
450+
contains(needs.changes.outputs.docker-files, 'Dockerfile_gentoo') ||
451+
(
452+
github.event.action == '' &&
453+
github.event.before == '' &&
454+
github.event.inputs == null
455+
)
456+
)
473457
uses: docker/build-push-action@v6
458+
timeout-minutes: 300
474459
with:
475460
build-args: NODEBUILDER_VERSION=${{ github.sha || github.head_ref || 'master' }}
476461
context: .

docker/Dockerfile_gentoo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
# Gentoo is known for its customization, optimization at the expense of image build time.
2+
# Gentoo is known for its customization, optimization at the expense of image build time.asdf
33
# This Dockerfile offers a stable base image but takes extra time to compile all dependencies.
44
FROM gentoo/stage3:latest@sha256:2acd0df1f811a71df73a639fab369d317b8c95717b66204d7e45a3cd1d606ec4
55

resources/config/paths-filter.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ dependencies:
66
- 'resources/dependencies/**'
77
docker:
88
- 'docker/Dockerfile*'
9-
docker-gentoo:
10-
- 'docker/Dockerfile_gentoo'
119
helpers:
1210
- '.github/scripts/**'
1311
markdown:

0 commit comments

Comments
 (0)