# What Artifact Stores Does Dewy Support? A Complete Guide to Pluggable Storage Backends

> Discover the artifact stores Dewy supports including S3, Docker registries, GCS, and GitHub Releases. Learn about its pluggable storage backends in this detailed guide.

- Repository: [Tomohisa Oda/dewy](https://github.com/linyows/dewy)
- Tags: tutorial
- Published: 2026-03-06

---

**Dewy supports four artifact stores: Amazon S3 (and S3-compatible services), Docker/OCI registries, Google Cloud Storage (GCS), and GitHub Releases, all implementing a common `Store` interface defined in [`artifact/artifact.go`](https://github.com/linyows/dewy/blob/main/artifact/artifact.go).**

The `linyows/dewy` project provides a pluggable artifact-storage layer that abstracts upload and download operations behind a unified interface. This architecture enables build pipelines to store artifacts in diverse backends without modifying core deployment logic. Understanding what artifact stores Dewy supports is essential for configuring continuous delivery workflows that match your infrastructure requirements.

## Supported Artifact Stores in Dewy

Dewy ships with four concrete storage implementations, each contained in its own file within the `artifact/` directory. When Dewy executes a build pipeline, the desired store is selected via the configuration file ([`config.go`](https://github.com/linyows/dewy/blob/main/config.go)), and the appropriate implementation is instantiated at runtime.

### Amazon S3

The **S3 store** uploads artifacts to Amazon S3 or any S3-compatible service such as MinIO or Wasabi. This implementation resides in [[`artifact/s3.go`](https://github.com/linyows/dewy/blob/main/artifact/s3.go)](https://github.com/linyows/dewy/blob/main/artifact/s3.go) and accepts configuration parameters including bucket name, region, and AWS credentials.

### Docker and OCI Registries

The **OCI store** pushes artifacts as OCI images to Docker-compatible registries including Docker Hub, GitHub Container Registry (GHCR), and Harbor. Implemented in [[`artifact/oci.go`](https://github.com/linyows/dewy/blob/main/artifact/oci.go)](https://github.com/linyows/dewy/blob/main/artifact/oci.go), this store treats build artifacts as container image layers, enabling distribution through existing registry infrastructure.

### Google Cloud Storage (GCS)

The **GCS store** stores artifacts in Google Cloud Storage buckets. Located in [[`artifact/gs.go`](https://github.com/linyows/dewy/blob/main/artifact/gs.go)](https://github.com/linyows/dewy/blob/main/artifact/gs.go), this implementation integrates with GCP's authentication mechanisms and bucket policies.

### GitHub Releases

The **GitHub Releases store** publishes artifacts as assets attached to GitHub releases. Found in [[`artifact/ghr.go`](https://github.com/linyows/dewy/blob/main/artifact/ghr.go)](https://github.com/linyows/dewy/blob/main/artifact/ghr.go), this store is ideal for open-source projects that distribute binaries alongside source code releases.

## The Store Interface Architecture

All artifact stores implement the same `Store` interface defined in [[`artifact/artifact.go`](https://github.com/linyows/dewy/blob/main/artifact/artifact.go)](https://github.com/linyows/dewy/blob/main/artifact/artifact.go). This interface standardizes interactions across storage backends by requiring three core methods:

- **`Upload`** – Transfers artifact data from the build environment to the storage backend
- **`Download`** – Retrieves artifacts for deployment or caching purposes
- **`Delete`** – Removes specific artifacts when they are no longer needed

This abstraction allows Dewy to switch between S3, OCI, GCS, and GitHub Releases without changing the underlying build pipeline logic.

## Configuring Artifact Stores

Store selection and instantiation occur at runtime through the configuration system defined in [`config.go`](https://github.com/linyows/dewy/blob/main/config.go). Each store constructor accepts a configuration struct specific to its authentication and endpoint requirements:

- **S3**: `S3Config` with `Bucket`, `Region`, `AccessID`, and `Secret`
- **OCI**: `OCIConfig` with `Registry`, `Repository`, `Username`, and `Password`
- **GCS**: Uses Google Application Default Credentials with bucket configuration
- **GitHub Releases**: `GHRConfig` with `Owner`, `Repo`, `ReleaseTag`, and `Token`

## Practical Implementation Examples

The following examples demonstrate how to instantiate and use each artifact store programmatically:

### Uploading to Amazon S3

```go
store, err := artifact.NewS3Store(artifact.S3Config{
    Bucket:   "my-artifacts",
    Region:   "us-east-1",
    AccessID: "AKIA…",
    Secret:   "••••••",
})
if err != nil { log.Fatal(err) }

err = store.Upload(ctx, "build.tar.gz", bytes.NewReader(data))

```

### Publishing to GitHub Releases

```go
store, err := artifact.NewGHRStore(artifact.GHRConfig{
    Owner:      "linyows",
    Repo:       "my-project",
    ReleaseTag: "v1.2.3",
    Token:      os.Getenv("GITHUB_TOKEN"),
})
if err != nil { log.Fatal(err) }

err = store.Upload(ctx, "binary.zip", bytes.NewReader(binData))

```

### Pushing to an OCI Registry

```go
store, err := artifact.NewOCIStore(artifact.OCIConfig{
    Registry:   "ghcr.io",
    Repository: "linyows/my-app",
    Username:   "linyows",
    Password:   os.Getenv("GHCR_TOKEN"),
})
if err != nil { log.Fatal(err) }

err = store.Upload(ctx, "my-app:latest", imageTarReader)

```

## Summary

- Dewy supports four concrete artifact store implementations: **Amazon S3**, **Docker/OCI registries**, **Google Cloud Storage**, and **GitHub Releases**.
- All stores implement the `Store` interface in [`artifact/artifact.go`](https://github.com/linyows/dewy/blob/main/artifact/artifact.go), providing standardized `Upload`, `Download`, and `Delete` methods.
- Store selection is configured in [`config.go`](https://github.com/linyows/dewy/blob/main/config.go) and instantiated at runtime based on your infrastructure requirements.
- Each store supports environment-specific authentication patterns, from AWS IAM credentials to GitHub personal access tokens.

## Frequently Asked Questions

### What is the primary interface for artifact stores in Dewy?

The `Store` interface defined in [`artifact/artifact.go`](https://github.com/linyows/dewy/blob/main/artifact/artifact.go) serves as the primary contract for all artifact storage implementations. This interface requires three methods—`Upload`, `Download`, and `Delete`—which ensure consistent behavior across S3, OCI, GCS, and GitHub Releases backends.

### Can I use S3-compatible alternatives like MinIO or Wasabi with Dewy?

Yes, the S3 store implementation in [`artifact/s3.go`](https://github.com/linyows/dewy/blob/main/artifact/s3.go) supports any S3-compatible service. Configure the endpoint URL, region, and credentials in `S3Config` to connect to alternatives such as MinIO, Wasabi, or Ceph Object Gateway instead of Amazon S3 proper.

### How does Dewy handle authentication for OCI registries?

The OCI store in [`artifact/oci.go`](https://github.com/linyows/dewy/blob/main/artifact/oci.go) accepts authentication via the `OCIConfig` struct, which includes `Username` and `Password` fields. For private registries like GHCR or Docker Hub, pass a personal access token or registry password through environment variables into the configuration.

### Is it possible to implement a custom artifact store for Dewy?

Yes, you can implement a custom store by creating a new Go file in the `artifact/` directory that satisfies the `Store` interface defined in [`artifact/artifact.go`](https://github.com/linyows/dewy/blob/main/artifact/artifact.go). After implementing `Upload`, `Download`, and `Delete` methods, register your constructor in [`config.go`](https://github.com/linyows/dewy/blob/main/config.go) to enable runtime selection alongside the built-in S3, OCI, GCS, and GitHub Releases options.