feat: OPS-11657 dev container generation - #58
Draft
mjuergens-cg wants to merge 32 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the reusable image publish workflow to optionally build/push devcontainers, and updates the Trivy/ClamAV scanning workflows to better support pulling images from GHCR (including authentication).
Changes:
- Added a
build_typeinput to switch between standard container builds anddevcontainers/cibuilds. - Changed downstream scanning to reference the pushed image by tag (instead of digest) and surfaced a tag output from the build job.
- Added GHCR authentication support for Trivy and ClamAV image pulls.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/image-publish-trivy.yaml |
Adds build_type support and devcontainer build path; changes scan image references and workflow-call refs. |
.github/workflows/check-trivy.yaml |
Provides GHCR credentials to Trivy via env vars. |
.github/workflows/check-image-clamav.yaml |
Logs into GHCR before pulling/exporting the image for ClamAV scanning. |
Suppressed comments (3)
.github/workflows/image-publish-trivy.yaml:228
docker/metadata-actiondoes not providetag-names, anddevcontainers/citypically expects tag values (not full image refs). Use the metadata action’s single-tagversionoutput and appendlatestonly when requested.
configFile: ${{ inputs.context }}/devcontainer.json
imageName: ${{ steps.extract-image-name.outputs.image-name }}
cacheFrom: ${{ steps.extract-image-name.outputs.image-name }}
imageTag: ${{ steps.docker_meta_img.outputs.tag-names }},latest
push: always
.github/workflows/image-publish-trivy.yaml:218
DOCKER_METADATA_OUTPUT_TAGScan contain multiple tags (often newline-separated). Using%%:*on the whole string can produce a multi-line/invalidimage-namevalue. Extract a single tag line first, then strip the tag suffix.
- name: Extract image name
id: extract-image-name
if: ${{ inputs.build_type == 'devcontainer' }}
run: |
echo "image-name=${DOCKER_METADATA_OUTPUT_TAGS%%:*}" >> "$GITHUB_OUTPUT"
.github/workflows/image-publish-trivy.yaml:270
- Reusable workflows should be pinned to a stable ref (tag/SHA) or referenced locally. Using a feature-branch ref like
@OPS-11657will break consumers once the branch is gone and makes runs non-reproducible.
uses: dBildungsplattform/dbp-github-workflows/.github/workflows/check-image-clamav.yaml@OPS-11657
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
266
to
269
| clamav_scan: | ||
| name: ClamAV scan of uploaded image | ||
| needs: [build_and_upload_image, pre_scan] | ||
| if: ${{ inputs.run_clamav_scan }} |
| packages: read | ||
| security-events: write | ||
| uses: dBildungsplattform/dbp-github-workflows/.github/workflows/check-trivy.yaml@8 | ||
| uses: dBildungsplattform/dbp-github-workflows/.github/workflows/check-trivy.yaml@OPS-11657 |
simoncolincap
approved these changes
Aug 3, 2026
mjuergens-cg
marked this pull request as ready for review
August 3, 2026 14:30
mjuergens-cg
marked this pull request as draft
August 6, 2026 06:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Links to Tickets or other PRs
Notes
Approval for review