Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
376 changes: 376 additions & 0 deletions content/manuals/build/release-notes/0.30.0.md

Large diffs are not rendered by default.

283 changes: 283 additions & 0 deletions content/manuals/build/release-notes/0.30.1.md

Large diffs are not rendered by default.

482 changes: 482 additions & 0 deletions content/manuals/build/release-notes/0.31.0.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions content/manuals/build/release-notes/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Buildx release notes
linkTitle: Release notes
description: Release notes for Buildx
keywords: buildx, docker, build, release notes
weight: 120
type: release-note
---

Release notes for Buildx. Each release includes new features, bug fixes,
and improvements.

For the latest releases and downloads, visit the
[GitHub releases page](https://github.com/docker/buildx/releases).
167 changes: 167 additions & 0 deletions hack/release-notes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# Release Notes Generator

Automatically fetch and generate release notes from GitHub repositories.

## Overview

This tool fetches releases from configured GitHub repositories using the `gh`
CLI and generates Hugo-compatible markdown files using Go templates.

## Requirements

- [gh CLI](https://cli.github.com/) - Must be installed and authenticated
- Go 1.23 or later (for building/running)

## Installation

The tool doesn't need to be installed. Run it directly:

```console
$ cd hack/release-notes
$ go run . <repo> [version]
```

Or build it:

```console
$ cd hack/release-notes
$ go build -o release-notes
$ ./release-notes <repo> [version]
```

## Usage

Fetch all releases for a repository:

```console
$ go run . buildx
```

Fetch a specific version:

```console
$ go run . buildx v0.18.0
```

Clean and refetch all releases:

```console
$ go run . --clean buildx
```

Fetch all configured repositories:

```console
$ for repo in buildx compose buildkit; do go run . $repo; done
```

## Configuration

Edit `config.json` to add or modify repositories. Each entry includes:

- `owner` - GitHub repository owner
- `repo` - GitHub repository name
- `content_path` - Where to generate files (relative to project root)
- `title_prefix` - Product name for titles
- `description_template` - SEO description (use `{{version}}` placeholder)
- `keywords_base` - Base keywords for SEO
- `fetch_limit` - Maximum releases to fetch (default: 20)
- `include_prereleases` - Include pre-releases (default: true)

## Template

The markdown template is in `templates/release-note.md.tmpl`. It uses Go's
`text/template` syntax (same as Hugo).

Edit the template to customize the generated markdown structure, headings, or
formatting.

## Generated Files

The tool generates:

- Individual release notes: `{version}.md` in the configured content path
- Section index: `_index.md` (if it doesn't exist)

Each release note includes:

- Hugo front matter with metadata
- Pre-release badge (if applicable)
- Release body from GitHub
- Downloads section with binaries table
- Checksums section
- Link to view on GitHub

## Automation

### GitHub Actions

Create a workflow to automatically fetch new releases:

```yaml
name: Update Release Notes

on:
schedule:
- cron: '0 12 * * *' # Daily at noon
workflow_dispatch: # Manual trigger

jobs:
update-release-notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Fetch release notes
run: |
cd hack/release-notes
for repo in buildx compose buildkit; do
go run . $repo
done

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: "Update release notes"
body: "Automated update of release notes from GitHub releases"
branch: release-notes-update
commit-message: "docs: update release notes"
```

## Development

Project structure:

```
hack/release-notes/
├── main.go # Main program logic
├── config.json # Repository configuration
├── templates/
│ └── release-note.md.tmpl # Markdown template
├── go.mod # Go module definition
└── README.md # This file
```

The program:

1. Reads `config.json` to get repository configurations
2. Uses `gh` CLI to fetch release data as JSON
3. Parses the JSON into Go structs
4. Processes assets into categories (binaries, checksums, metadata)
5. Executes the markdown template with the data
6. Writes the generated markdown to the content directory

## Updating Existing Content

The tool skips files that already exist unless you use `--clean`. To update a
single release:

```console
$ go run . buildx v0.18.0
```

This overwrites the existing file with fresh content from GitHub.
34 changes: 34 additions & 0 deletions hack/release-notes/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"repos": [
{
"owner": "docker",
"repo": "buildx",
"content_path": "content/manuals/build/release-notes",
"title_prefix": "Buildx",
"description_template": "Release notes for Docker Buildx {{version}}",
"keywords_base": "buildx, docker, build, release notes",
"fetch_limit": 30,
"include_prereleases": true
},
{
"owner": "docker",
"repo": "compose",
"content_path": "content/manuals/compose/release-notes",
"title_prefix": "Compose",
"description_template": "Release notes for Docker Compose {{version}}",
"keywords_base": "compose, docker, release notes",
"fetch_limit": 30,
"include_prereleases": true
},
{
"owner": "moby",
"repo": "buildkit",
"content_path": "content/manuals/build/buildkit/release-notes",
"title_prefix": "BuildKit",
"description_template": "Release notes for BuildKit {{version}}",
"keywords_base": "buildkit, docker, dockerfile, release notes",
"fetch_limit": 30,
"include_prereleases": true
}
]
}
3 changes: 3 additions & 0 deletions hack/release-notes/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/docker/docs/hack/release-notes

go 1.23
Loading
Loading