Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: GitHub Action reusable workflow #1028

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

neumachen
Copy link
Contributor

@neumachen neumachen commented Dec 18, 2024

Description

This PR introduces a comprehensive container image build and publishing pipeline using GitHub Actions.

Key Features

  • Multi-architecture container builds (linux/amd64, linux/arm64)
  • Build caching optimization for faster builds
  • Container image signing using Docker Content Trust
  • Software Bill of Materials (SBOM) generation
  • Image provenance for supply chain security
  • Local testing support via act

Workflows

  • CI: Runs on PRs to validate container builds
  • CD: Builds, publishes and signs images on merges to main/develop and tags
  • Reusable composite actions for container builds and signing

Security

  • Docker Content Trust for image signing
  • SBOM generation for dependency tracking
  • Image provenance for build verification
  • Privileged container support for multi-arch builds

The pipeline publishes images to both DockerHub and GitHub Container Registry with appropriate tagging and versioning.

Motivation and Context

This change introduces a robust and secure container image pipeline that addresses several key operational and security needs:

  1. Broader Platform Support: By adding multi-architecture builds (amd64/arm64), we enable deployment across a wider range of environments, including cloud providers and
    edge devices.
  2. Build Performance: Implementation of build caching will significantly reduce build times, especially important for frequent updates and CI/CD efficiency.
  3. Supply Chain Security: The addition of image signing, SBOM generation, and provenance tracking provides:
    • Verifiable trust chain for deployed images
    • Comprehensive dependency tracking and vulnerability management
    • Compliance with modern security best practices
  4. Developer Experience: Local testing support via act enables developers to validate workflow changes before committing, reducing integration issues.
  5. Deployment Flexibility: Dual publishing to DockerHub and GitHub Container Registry provides redundancy and flexibility in deployment options.

These improvements align with industry best practices for container security and distribution while enhancing our development and deployment capabilities.

How Has This Been Tested?

Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.

Screenshots (optional):

Types of changes

  • Chore (a change that does not modify the application functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Database Migrations

Checklist:

@neumachen neumachen force-pushed the feat/github-action-workflow branch 28 times, most recently from 0417863 to a11bf09 Compare December 18, 2024 22:14
@neumachen neumachen force-pushed the feat/github-action-workflow branch 2 times, most recently from 0c40ba5 to 6555e47 Compare January 7, 2025 16:52
@neumachen neumachen force-pushed the feat/github-action-workflow branch 4 times, most recently from 8feaacf to 6e41000 Compare January 21, 2025 20:26
@neumachen neumachen changed the title refactor(WIP): enhance CI/CD workflow feature: enhance CI/CD workflow Jan 22, 2025
@neumachen neumachen marked this pull request as ready for review January 22, 2025 18:47
@neumachen neumachen force-pushed the feat/github-action-workflow branch from 6e41000 to ebcdc8e Compare January 22, 2025 18:48
@neumachen neumachen changed the title feature: enhance CI/CD workflow feature: GitHub Action reusable workflow Jan 22, 2025
@neumachen neumachen force-pushed the feat/github-action-workflow branch from ebcdc8e to fc5c253 Compare January 22, 2025 18:58
Copy link
Contributor

@superlinkx superlinkx left a comment

Choose a reason for hiding this comment

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

Everything seems in order here. Really looking forward to standardizing the remaining actions into this workflow

@@ -100,7 +100,7 @@ RUN sha256sum azurehound-$AZUREHOUND_VERSION.zip > azurehound-$AZUREHOUND_VERSIO
########
# Package Bloodhound
################
FROM gcr.io/distroless/static-debian11
FROM gcr.io/distroless/static-debian11 as bloodhound
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth fixing these warnings since they're minor

@neumachen neumachen merged commit ca2d857 into main Jan 22, 2025
8 checks passed
@neumachen neumachen deleted the feat/github-action-workflow branch January 22, 2025 21:37
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2025
@ddlees ddlees restored the feat/github-action-workflow branch January 23, 2025 22:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants