Skip to content

Conversation

@rjaegers
Copy link
Member

@rjaegers rjaegers commented Oct 10, 2025

This pull request refactors and enhances the GitHub Actions workflows for building, testing, and publishing multi-architecture devcontainer images. The changes introduce more flexible and reusable workflow templates, improve input/output handling, and add documentation and validation to standardize workflow practices across the repository.

Workflow Refactoring and Reusability

  • Refactored the build and test workflows to use a more modular, parameterized approach, replacing hardcoded flavor usage with flexible inputs like dockerfile, image-name, and test paths. This enables easier extension to new flavors and architectures. (wc-build-push.yml, wc-build-push-test.yml, continuous-integration.yml, release-build.yml) [1] [2] [3] [4]
  • Added a new workflow (wc-sanitize-image-name.yml) and corresponding job to sanitize and standardize image names and registry references for all build/push operations. This ensures consistent image naming and tagging.

Input/Output and Secrets Handling

  • Enhanced workflows to support passing and mapping of additional inputs (e.g., devcontainer metadata, runner labels, registry credentials), and standardized output variables for downstream jobs. Secrets are now more flexibly handled, with conditional requirements. (wc-build-push.yml, wc-build-push-test.yml) [1] [2]
  • Updated acceptance and integration test workflows to use path-based inputs for test files and devcontainer files, improving maintainability and clarity. (wc-acceptance-test.yml) [1] [2] [3]

Testing and Publishing Improvements

  • Added matrix strategies for flavors and runners, enabling parallel builds and tests across multiple architectures and environments. (continuous-integration.yml, release-build.yml, wc-build-push-test.yml, wc-build-push.yml) [1] [2] [3]
  • Improved artifact naming and conditional publishing of test results to support multi-flavor and multi-arch test runs. (wc-acceptance-test.yml, continuous-integration.yml) [1] [2]

Documentation and Guidelines

  • Added a new documentation file .github/instructions/workflows.instructions.md outlining best practices for workflow naming, input/output sorting, and file conventions to ensure consistency and maintainability.

General Workflow Robustness

  • Improved conditional logic for workflow steps (e.g., use of ${{ !cancelled() }} for step execution, better handling of optional inputs and secrets, and more robust runner selection for jobs). (wc-acceptance-test.yml, pr-conventional-title.yml, wc-build-push.yml) [1] [2] [3]

Copilot AI review requested due to automatic review settings October 10, 2025 10:26
@rjaegers rjaegers requested a review from a team as a code owner October 10, 2025 10:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the wc-build-push.yml workflow to make it more reusable by adding configurable registry and authentication options. Previously, the workflow was hardcoded to use GitHub Container Registry with GitHub authentication.

  • Adds optional registry input parameter with ghcr.io as the default
  • Introduces optional Docker authentication secrets (DOCKER_USERNAME and DOCKER_PASSWORD)
  • Updates the workflow to use configurable registry and authentication with fallbacks to GitHub defaults

@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2025

Test Results

 5 files  ±0   5 suites  ±0   3m 17s ⏱️ -15s
31 tests ±0  31 ✅ ±0  0 💤 ±0  0 ❌ ±0 
65 runs  ±0  65 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit e192a30. ± Comparison against base commit d800a0b.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2025

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 22 0 0 0.53s
✅ DOCKERFILE hadolint 2 0 0 0.77s
✅ GHERKIN gherkin-lint 6 0 0 2.29s
✅ JSON npm-package-json-lint yes no no 0.35s
✅ JSON prettier 15 2 0 0 0.52s
✅ JSON v8r 15 0 0 10.77s
✅ MARKDOWN markdownlint 11 0 0 0 0.94s
✅ MARKDOWN markdown-table-formatter 11 0 0 0 0.24s
✅ REPOSITORY gitleaks yes no no 0.66s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY grype yes no no 28.33s
✅ REPOSITORY secretlint yes no no 0.98s
✅ REPOSITORY syft yes no no 2.0s
✅ REPOSITORY trivy yes no no 4.54s
✅ REPOSITORY trivy-sbom yes no no 0.24s
✅ REPOSITORY trufflehog yes no no 3.04s
⚠️ SPELL lychee 73 1 0 21.57s
✅ YAML prettier 28 0 0 0 0.83s
✅ YAML v8r 28 0 0 7.88s
✅ YAML yamllint 28 0 0 0.97s

Detailed Issues

⚠️ SPELL / lychee - 1 error
[IGNORED] docker://pandoc/extra:3.7.0@sha256:a703d335fa237f8fc3303329d87e2555dca5187930da38bfa9010fa4e690933a | Unsupported: Error creating request client: builder error for url (docker://pandoc/extra:3.7.0@sha256:a703d335fa237f8fc3303329d87e2555dca5187930da38bfa9010fa4e690933a)
[ERROR] https://slsa.dev/spec/v1.0/threats | Network error: error sending request for url (https://slsa.dev/spec/v1.0/threats) Maybe a certificate error?
[IGNORED] https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/philips-software/amp-devcontainer | Unsupported: Error creating request client: builder error for url (vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/philips-software/amp-devcontainer)
📝 Summary
---------------------
🔍 Total..........122
✅ Successful.....119
⏳ Timeouts.........0
🔀 Redirected.......0
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........1

Errors in test/cpp/features/security.feature
[ERROR] https://slsa.dev/spec/v1.0/threats | Network error: error sending request for url (https://slsa.dev/spec/v1.0/threats) Maybe a certificate error?

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx [email protected] --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,DOCKERFILE_HADOLINT,GHERKIN_GHERKIN_LINT,JSON_V8R,JSON_PRETTIER,JSON_NPM_PACKAGE_JSON_LINT,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security

@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2025

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-rust:edgeghcr.io/philips-software/amp-devcontainer-rust:pr-968

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 539.33 MB 539.33 MB +199 B (+0%) 🔼
linux/arm64 495.81 MB 495.81 MB 314 B (0%) 🔽

@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2025

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-cpp:edgeghcr.io/philips-software/amp-devcontainer-cpp:pr-968

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 693.5 MB 693.5 MB +440 B (+0%) 🔼
linux/arm64 676.55 MB 676.55 MB 73 B (0%) 🔽

Copilot AI review requested due to automatic review settings October 10, 2025 14:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings October 13, 2025 08:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

.github/workflows/wc-build-push.yml:1

  • This step references inputs.flavor and CONTAINER_FLAVOR which no longer exist after the refactoring. This should use the new inputs.devcontainer-metadata parameter and handle the case when it's not provided.
---

Copilot AI review requested due to automatic review settings October 13, 2025 08:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

.github/workflows/wc-build-push.yml:1

  • The step still references the removed CONTAINER_FLAVOR environment variable. This should use the new devcontainer-metadata input parameter or be updated to work with the new parameterized approach.
---

@github-actions
Copy link
Contributor

github-actions bot commented Oct 13, 2025

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-rust:edgeghcr.io/philips-software/amp-devcontainer-rust:pr-968

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 536.91 MB 536.91 MB +385 B (+0%) 🔼
linux/arm64 493.59 MB 493.59 MB +48 B (+0%) 🔼

@github-actions
Copy link
Contributor

github-actions bot commented Oct 13, 2025

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-cpp:edgeghcr.io/philips-software/amp-devcontainer-cpp:pr-968

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 691.11 MB 691.11 MB 1.11 kB (0%) 🔽
linux/arm64 674.32 MB 674.32 MB +546 B (+0%) 🔼

Copilot AI review requested due to automatic review settings October 13, 2025 10:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

.github/workflows/wc-build-push.yml:1

  • This code references the old inputs.flavor parameter which no longer exists, and uses hardcoded path .devcontainer/${CONTAINER_FLAVOR}/. This should use the new inputs.devcontainer-metadata parameter instead.
---

@rjaegers rjaegers changed the title ci: refactor wc-build-push for better re-use ci: refactor re-usable workflows to enable re-use in derived repositories Oct 13, 2025
uses: ./.github/workflows/wc-dependency-review.yml
permissions:
contents: read
pull-requests: write

Check warning

Code scanning / zizmor

permissions without explanatory comments Warning

permissions without explanatory comments
Copilot AI review requested due to automatic review settings October 15, 2025 18:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 22 out of 24 changed files in this pull request and generated 1 comment.

@rjaegers rjaegers enabled auto-merge October 15, 2025 18:15
Copilot AI review requested due to automatic review settings October 15, 2025 18:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 22 out of 24 changed files in this pull request and generated no new comments.

@rjaegers rjaegers added this pull request to the merge queue Oct 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 16, 2025
Copilot AI review requested due to automatic review settings October 16, 2025 05:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 23 out of 25 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings October 16, 2025 06:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 23 out of 25 changed files in this pull request and generated 1 comment.

@sonarqubecloud
Copy link

@rjaegers rjaegers enabled auto-merge October 16, 2025 06:31
@rjaegers rjaegers added this pull request to the merge queue Oct 16, 2025
Merged via the queue into main with commit 4c4130c Oct 16, 2025
33 checks passed
@rjaegers rjaegers deleted the ci/refactor-reusable-workflows-for-better-re-use branch October 16, 2025 06:47
@github-actions
Copy link
Contributor

Pull Request Report (#968)

Static measures

Description Value
Number of added lines 464
Number of deleted lines 181
Number of changed files 25
Number of commits 53
Number of reviews 35
Number of comments (w/o review comments) 7
Number of reviews that contains a comment to resolve 34
Number of reviews that requested a change from the author 0
Number of reviews that approved the Pull Request 1
Get the total number of participants of a Pull Request 6

Time related measures

Description Value
PR lead time (from creation to close of PR) 5.8 Days
Time that was spend on the branch before the PR was created 10 Sec
Time that was spend on the branch before the PR was merged 5.8 Days
Time to merge after last review 37.3 Min

Status check related measures

Description Value
Total runtime for last status check run (Workflow for PR) 42.7 Min
Total time spend in last status check run on PR 15.3 Min

@github-actions
Copy link
Contributor

🎉 Hooray! The changes in this pull request went live with the release of v6.5.2 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants