Skip to content

feat(docker): add setup-ccbr-actions composite action and Docker build workflow#190

Draft
kelly-sovacool with Copilot wants to merge 3 commits into
mainfrom
copilot/create-docker-with-ccbr-actions-installed
Draft

feat(docker): add setup-ccbr-actions composite action and Docker build workflow#190
kelly-sovacool with Copilot wants to merge 3 commits into
mainfrom
copilot/create-docker-with-ccbr-actions-installed

Conversation

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Composite actions in this repo always pip-install ccbr_actions from GitHub. This PR adds a Docker image for ccbr_actions and a composite action that uses it when available, falling back to pip only when no matching image exists.

New: Dockerfile + build workflow

  • Dockerfile: python:3.11-slim base; installs ccbr_actions via pip at CCBR_ACTIONS_VERSION build-arg (defaults to main). Includes print_versions.sh and prepare_docker_build_variables.sh scripts.
  • .github/workflows/build-docker-ccbr-actions.yml: builds and pushes nciccbr/ccbr_actions:{tag} to DockerHub on release: published; manually triggerable with optional push flag.

New: setup-ccbr-actions composite action

Replaces the actions/setup-python + pip-install pattern used across composite actions. Logic:

  1. Queries DockerHub API for nciccbr/ccbr_actions:{ccbr-actions-version}
  2. HTTP 200 → docker path: docker pull, outputs install-method=docker + docker-image=nciccbr/ccbr_actions:{version}
  3. Otherwise → pip path: actions/setup-python + pip install, outputs install-method=pip

Outputs let callers branch on which method is active.

Updated: build-docker action

  • Replaces inline setup-python + pip-install with ./setup-ccbr-actions
  • Converts shell: python steps (prepare_vars, check_tag_staleness) to shell: bash with conditional dispatch:
    • docker: docker run with $GITHUB_ENV / $GITHUB_OUTPUT bind-mounted so Python can write outputs
    • pip: run Python directly on the host
  • run_script_in_container step extracts print_versions.sh and the default config file from the ccbr_actions image via docker run --entrypoint sh when in docker mode
- name: Set up ccbr_actions
  id: setup-ccbr-actions
  uses: CCBR/actions/setup-ccbr-actions@main
  with:
    ccbr-actions-version: v0.8.0   # has a DockerHub image → docker path
    # ccbr-actions-version: my-branch  # no image → pip fallback

Copilot AI added 2 commits July 2, 2026 16:32
…d workflow

- Add Dockerfile to build a Python 3.11-slim image with ccbr_actions pre-installed
- Add .github/workflows/build-docker-ccbr-actions.yml to automatically build
  and push nciccbr/ccbr_actions:{tag} to DockerHub on release
- Add setup-ccbr-actions composite action that checks if nciccbr/ccbr_actions:{version}
  exists on DockerHub and uses it (docker pull) if available, otherwise installs
  ccbr_actions via pip
- Update build-docker to use setup-ccbr-actions instead of directly installing
  via pip, with full support for running Python steps via docker or directly

Closes #186"
…ropy

- Mount temp script at its actual host path (not a fixed container path) to
  avoid conflicts when multiple runs use the same container
- Increase mktemp randomness from 6 to 10 X's for better uniqueness"
Copilot AI changed the title [WIP] Create Docker with ccbr_actions installed feat(docker): add setup-ccbr-actions composite action and Docker build workflow Jul 2, 2026
Copilot AI requested a review from kelly-sovacool July 2, 2026 16:34
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.

create docker w/ ccbr_actions installed

2 participants