Skip to content
Merged
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
74 changes: 74 additions & 0 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Documentation Quality Check

on:
pull_request:
branches: [main, docs-ng]
types: [opened, synchronize, reopened, closed]
paths:
- 'docs/**'
push:
branches: [main, docs-ng]
paths:
- 'docs/**'

jobs:
docs-checks:
# Skip checks on closed PRs (only need the notification)
if: github.event_name != 'pull_request' || github.event.action != 'closed'
uses: gardenlinux/docs-ng/.github/workflows/docs-checks.yml@main
with:
override-repo: ${{ github.event.repository.name }}
override-ref: ${{ github.head_ref || github.ref_name }}
override-commit: ${{ github.event.pull_request.head.sha || github.sha }}

notify-docs-ng:
name: Notify docs-ng
needs: [docs-checks]
runs-on: ubuntu-24.04
# Only notify for PR events (not push events which lack PR context)
# Run after checks pass for open PRs, OR immediately for merged PRs
if: |
always() &&
github.event_name == 'pull_request' &&
(
(github.event.action == 'closed' && github.event.pull_request.merged == true) ||
(github.event.action != 'closed' && needs.docs-checks.result == 'success')
)
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
private-key: ${{ secrets.DOCS_BOT_PRIVATE_KEY }}
repositories: docs-ng

- name: Send repository dispatch to docs-ng
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const isMergedPR = context.payload.action === 'closed' &&
context.payload.pull_request.merged === true;

// For merged PRs, use the base branch (the branch it was merged into)
// For open PRs, use the head branch (feature branch)
const ref = isMergedPR
? context.payload.pull_request.base.ref
: context.payload.pull_request.head.ref;

await github.rest.repos.createDispatchEvent({
owner: 'gardenlinux',
repo: 'docs-ng',
event_type: 'docs-pr',
client_payload: {
repo: '${{ github.event.repository.name }}',
pr_number: `${context.payload.pull_request.number}`,
commit_sha: isMergedPR
? context.payload.pull_request.merge_commit_sha
: context.payload.pull_request.head.sha,
ref: ref,
event: isMergedPR ? 'merged' : 'pr_success'
}
});
core.info('Repository dispatch sent to docs-ng');
155 changes: 42 additions & 113 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,115 +1,44 @@
# Gardenlinux Repo Infrastructure

```mermaid
flowchart TD
repo[gardenlinux/repo]
snapshot[gardenlinux/repo-debian-snapshot]
pkg_build[gardenlinux/package-build]
pkg[gardenlinux/package-*]
ghcr_snapshot[ghcr.io/gardenlinux/repo-debian-snapshot]
s3[s3://gardenlinux-repo/gardenlinux]
s3_snapshot[s3://gardenlinux-repo/debian-snapshot]
deb[apt://deb.debian.org/debian]

deb -- mirror --> snapshot
snapshot -- publish --> s3_snapshot
s3_snapshot -- ref --> ghcr_snapshot
snapshot -- publish --> ghcr_snapshot

pkg_build -- use workflow / tooling --> pkg
ghcr_snapshot -- runs in --> pkg

pkg -- get release artifacts --> repo
s3_snapshot -- get dependencies and imports --> repo
repo -- publish --> s3
```

## GitHub

- `gardenlinux/repo`
- collect packages from `package-*` repos, fetch all dependencies from debian snapshot and publish into an APT repo distribution
- [`gardenlinux/repo-debian-snapshot`](https://github.com/gardenlinux/repo-debian-snapshot)
- regularly snapshot debian testing (needed for reproducible package and repo builds)
- [`gardenlinux/package-build`](https://github.com/gardenlinux/package-build)
- tooling used by `package-*` repos to build binary debian packages
- [`gardenlinux/package-*`](https://github.com/gardenlinux?q=package-&type=all&language=&sort=)
- repos for custom-built packages

## AWS

- bucket: `gardenlinux-repo`
- `/pool` for all package files
- `/gardenlinux` for gardenlinux release dists
- `/debian-snapshot` for time stamp indexed debian testing snapshot dists
- cloudfront: `E2RAO851VDQ2KX`
- proxies bucket `gardenlinux-repo` using lambda `repoPathRewrite` to fix problem with aws S3 http endpoint handling `+` in filenames incorrectly and redirects all requests for `/*/pool` to `/pool` => allowing to use a shared pool directory for gardenlinux repo and debian-snapshot
- role: `github-repo-oidc-role`
- allows all actions running in an environment 'aws' from repos matching 'gardenlinux/repo-*' to access
- policy: `github-repo-policy`
- gives read/write access to S3 bucket `gardenlinux-repo`
- gives access to gardenlinux repo signing key on KMS

## Repo patch release workflow

The `update.yml` GitHub action automatically creates daily releases of the form `<GL_VERSION>.0`.
Each release corresponds to a tag of the same name in this repo.
These tags contain a generated file called `package-releases` that pins the custom build package versions to include in this release.

To create a patch release, simply checkout this tag, adjust the `package-release` and `package-imports` files as needed, commit and tag this commit as `<GL_VERSION>.X`

```
git fetch --tags
git checkout [-b] rel-<GL_VERSION>
# modify package-releases and package-imports as needed
git commit
# push to release branch
git push origin rel-<GL_VERSION>
# tag and push tag
git tag <GL_VERSION>.1
git push origin <GL_VERSION>.1
```

## Remove Garden Linux packages from the repo

If, for whatever reason, we need to switch back to debian mirrored packages, a null release (with no content/assets) should be created.

> [!IMPORTANT]
> DO NOT RENAME PACKAGE REPOS

This is going to break future patch releases, if needed. Also, you should disable github actions for that repo, in order to prevent version updates from overwriting the null release.

Create a branch to remove all files / actions, place a README to record the history for later reference and tag the repo with null as in below steps:

- Create a branch called archive-<pkgname> with the last state of the repo.
```
git checkout -b archive-<PACKAGE_NAME>
```
- Disable GitHub Actions and other files
```
git rm -r .github/workflows
git rm -r <ALL_FILES>
```
- Create a README.md to record what this package was and why was it needed
```
git add README.md
```
- Convert the branch to "null" branch
```
git commit -a -m "null"
git push -u origin archive-<PACKAGE_NAME>
```
- Create the PR for a review, once approved:
- Create a null tag for the repo
```
git tag null
git push origin null
```
- Create the Release (important), with a non-empty file
```
echo null > ~/null
gh release create null ~/null --latest --notes null --title 'ignore package for repo import'
```
- Archive the repo in GitHub
```
Web browser > github.com/gardenlinux/package-NAME_repo > Settings > Danger Zone > Archive
```
## Documentation

Our [documentation hub](https://gardenlinux-docs.netlify.app/) contains detailed
documentation about the following topics in this repository:

- [Repository Infrastructure](https://gardenlinux-docs.netlify.app/explanation/repo-infrastructure.html)
- [Creating APT Repository Releases](https://gardenlinux-docs.netlify.app/how-to/releases/apt-repos.html)

# Community

To stay up-to-date with recent news about Gardenlinux, subscribe to our mailing
list:

https://lists.neonephos.org/g/gardenlinux-discussion

For updates and statements regarding security issues, we have a security mailing
list for you:

https://lists.neonephos.org/g/gardenlinux-security

For embargoed security related topics, this list is for you:

https://lists.neonephos.org/g/gardenlinux-security-embargo

# Contributing

We welcome your contributions to Gardenlinux or any supporting projects.

To find our more, visit our
[Contributor Documentation](https://gardenlinux-docs.netlify.app/contributing).

## Licensing

Copyright 2025 SAP SE or an SAP affiliate company and GardenLinux contributors.
See our [LICENSE](LICENSE.md) for copyright and license information.
Detailed information including third-party components and their
licensing/copyright information is available
[via the REUSE tool](https://reuse.software).

<p align="center">
<img alt="Bundesministerium für Wirtschaft und Energie (BMWE)-EU funding logo" src="https://apeirora.eu/assets/img/BMWK-EU.png" width="400"/>
</p>
Loading
Loading