Skip to content

feat: OPS-11657 dev container generation - #58

Draft
mjuergens-cg wants to merge 32 commits into
mainfrom
OPS-11657
Draft

feat: OPS-11657 dev container generation#58
mjuergens-cg wants to merge 32 commits into
mainfrom
OPS-11657

Conversation

@mjuergens-cg

Copy link
Copy Markdown
Contributor

Description

Links to Tickets or other PRs

Notes

Approval for review

  • All points were discussed with the ticket creator, support-team or product owner. The code upholds all quality guidelines from the PR-template.

Notice: Please remove the WIP label if the PR is ready to review, otherwise nobody will review it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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_type input to switch between standard container builds and devcontainers/ci builds.
  • 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-action does not provide tag-names, and devcontainers/ci typically expects tag values (not full image refs). Use the metadata action’s single-tag version output and append latest only 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_TAGS can contain multiple tags (often newline-separated). Using %%:* on the whole string can produce a multi-line/invalid image-name value. 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-11657 will 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 thread .github/workflows/image-publish-trivy.yaml
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
Comment thread .github/workflows/check-image-clamav.yaml
@mjuergens-cg mjuergens-cg changed the title Ops 11657 feat: OPS-11657 dev container generation Aug 3, 2026
@mjuergens-cg
mjuergens-cg marked this pull request as ready for review August 3, 2026 14:30
@mjuergens-cg
mjuergens-cg requested a review from a team August 3, 2026 14:31
@mjuergens-cg
mjuergens-cg marked this pull request as draft August 6, 2026 06:24
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