Skip to content

Implement docker-release-action with prefixed images and reusable workflows - #1

Closed
l-you with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-f5a89c95-87fa-4ece-a3b9-516d26d0629b
Closed

Implement docker-release-action with prefixed images and reusable workflows#1
l-you with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-f5a89c95-87fa-4ece-a3b9-516d26d0629b

Conversation

Copilot AI commented Sep 15, 2025

Copy link
Copy Markdown

This PR implements a complete GitHub Action for building and pushing multi-platform Docker images, following the template patterns from php-composer-testing-action and infrastructure repositories as requested in the issue.

Key Features Implemented

🐳 Multi-platform Docker Image Building

  • Supports linux/amd64 and linux/arm64 by default with configurable platforms
  • Uses Docker Buildx for efficient multi-architecture builds
  • Integrates with GitHub Container Registry (GHCR) by default, with support for other registries

🏷️ Configurable Image Prefixes

  • Allows adding custom prefixes to image names (e.g., myorg- creates myorg-myapp)
  • Handles different registry formats intelligently:
    • GHCR: ghcr.io/{owner}/{prefix}{image-name}
    • Docker Hub: docker.io/{prefix}{image-name}

🔄 Reusable Workflows

  • Composite action for direct use in workflows
  • Reusable workflow template for consistent multi-repo usage
  • Supports both single image builds and multi-image projects

Implementation Details

The action follows the composite action pattern from php-composer-testing-action:

  • Uses runs.using: "composite" structure
  • Includes proper input validation and defaults
  • Provides meaningful outputs (image name and digest)

The Docker build process mirrors the infrastructure repository workflows:

  • QEMU setup for multi-platform builds
  • Docker Buildx configuration
  • Metadata extraction for proper tagging
  • Registry authentication handling

Usage Examples

Basic Usage

- uses: RevoTale/docker-release-action@v1
  with:
    image-name: my-app

With Custom Prefix

- uses: RevoTale/docker-release-action@v1
  with:
    image-name: api
    image-prefix: mycompany-
    context: ./api

As Reusable Workflow

jobs:
  docker:
    uses: RevoTale/docker-release-action/.github/workflows/reusable.yml@v1
    with:
      image-name: my-app
      image-prefix: org-

Files Added

  • action.yml - Main composite action definition
  • .github/workflows/reusable.yml - Reusable workflow template
  • .github/workflows/major-version.yml - Version management (from php-composer-testing-action)
  • .github/workflows/test.yml - Testing workflow
  • examples/ - Complete usage examples for different scenarios
  • Dockerfile and test/Dockerfile - Test infrastructure
  • Updated README.md with comprehensive documentation

The implementation is fully tested with Docker builds and YAML validation, ensuring it works correctly across different use cases while maintaining the minimal, focused approach requested.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…kflows

Co-authored-by: l-you <32598874+l-you@users.noreply.github.com>
Copilot AI changed the title [WIP] Use template of action from https://github.com/RevoTale/php-composer-testing-action Use template of docker image builder from https://github.com/RevoTale/infrastructure add ability to create prefixed images and to be reusable. Implement docker-release-action with prefixed images and reusable workflows Sep 15, 2025
Copilot AI requested a review from l-you September 15, 2025 15:04
@l-you l-you closed this Sep 15, 2025
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.

2 participants