anchore / anchore/oss-docs

Add github action to automate updates to releases pages

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6
Forks
11
Avg merge
1m
Merged PRs (30d)
8

Description

The "Releases" pages contain a mirror of the information typically found in the GitHub release pages for each application. This information is reproduced within the docs pages to ensure people can find it without having to go off-site to GitHub when looking for this dynamic information.

Image

The script `scripts/generate-release-notes.sh` wraps `scripts/release-to-hugo.py` to generate the pages:

```
$ scripts/generate-release-notes.sh
Processing syft with weight 10...
Fetching releases from anchore/syft on GitHub...
Found 213 releases
Skipping existing release: v1.32.0 (already exists)
Skipping existing release: v1.31.0 (already exists)
Skipping existing release: v1.30.0 (already exists)
Skipping existing release: v1.29.1 (already exists)

Skipping existing release: v0.1.0-beta.5 (already exists)
Skipping existing release: v0.1.0-beta.4 (already exists)
Skipping existing release: v0.1.0-beta.3 (already exists)
Skipping existing release: v0.1.0-beta.2 (already exists)
Skipping existing release: v0.1.0-beta.1 (already exists)
Done!
✅ Successfully generated release notes for syft
-----------------------------------
Processing grype with weight 20...
Fetching releases from anchore/grype on GitHub...
Found 174 releases
Skipping existing release: v0.99.1 (already exists)
Skipping existing release: v0.99.0 (already exists)
Skipping existing release: v0.98.0 (already exists)
Skipping existing release: v0.97.2 (already exists)
```

etc.

It only generates if the existing markdown file isn't already there. If the `content/docs/releases/*` is removed, then the script will re-generate all of the release notes files. This could be useful if the code/format of the release notes needs to change.

We should replace this with a GitHub action that could be run regularly and generate a pull request when files are updated. It could also be triggered somehow by the releases of our OSS tools.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading scripts/generate-release-notes.sh and scripts/release-to-hugo.py to understand how release pages are generated and skipped when they already exist. The work is done when a GitHub Action runs the generation on a regular or release-triggered basis and opens a pull request when release-page files are updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python, shell
Domain
ci-cd, documentation, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.