Skip to content

Commit 4510a9d

Browse files
committed
Start working on the READMEs
1 parent 65fefda commit 4510a9d

File tree

3 files changed

+137
-1
lines changed

3 files changed

+137
-1
lines changed

.github/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Purpose
2+
3+
This repository is a template repository for generating Atomic AlmaLinux respins.
4+
5+
[Create a new repository](https://github.com/new?template_name=atomic-respin-template&template_owner=AlmaLinux)
6+
using this template to get started! Once that's done, there you can follow [the instructions](README.md) of your
7+
newly-created repository to start customizing your image.
8+
9+
# Contributing
10+
11+
We welcome contributions to all parts of the AlmaLinux project. If you'd like to get involved, please feel free to reach out through [the chat](https://chat.almalinux.org/almalinux/channels/sigatomic)!
12+
13+
## Contributing - Code and Design
14+
15+
This project is a template for starting new Atomic AlmaLinux respins.
16+
17+
Before submitting code changes, please check if there are any open issues or pull requests that cover your proposal. If not, open an issue with a brief description and so you can discuss it with us first. This helps avoid duplicated work and ensures proposed changes align with project goals. This can be your anticipated workflow:
18+
19+
- Create an issue describing your changes.
20+
- Await confirmation from contributors.
21+
- Fork the project.
22+
- Create a new branch for your feature or bug fix.
23+
- Add your code, documentation, etc.
24+
- Submit a pull request (PR). All PRs should target the `main` branch.
25+
26+
After review and approval, the changes will be merged and deployed.
27+
28+
## Reporting a Bug
29+
30+
If you find a bug, please report it [here](issues)!
31+
32+
## Requesting a Feature
33+
34+
We're open to feature requests! Please follow this workflow:
35+
36+
1. [Search existing issues](issues) to see if the feature has already been requested. If so, give it a thumbs up, +1, or a comment on your use-case.
37+
2. If no similar request exists, open a new issue. Please clearly explain why the feature is needed and provide a detailed use case.
38+
39+
## Change Approval Process
40+
41+
- Minor or cosmetic changes (typos, small style tweaks) can be reviewed and approved by any contributor with merge rights.
42+
- Larger changes should be agreed on as a SIG.
43+
44+
# Getting help
45+
46+
This repo is managed by the Atomic SIG. You can see how best to contact us in the [AlmaLinux wiki](https://wiki.almalinux.org/sigs/Atomic.html).
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Initial Setup
3+
on: push
4+
5+
permissions:
6+
contents: write
7+
8+
jobs:
9+
start:
10+
runs-on: ubuntu-latest
11+
if: github.repository != 'AlmaLinux/atomic-respin-template'
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Run initial setup script
17+
run: |
18+
rm -rf \
19+
.github/README.md \
20+
.github/workflows/initial_setup.yml
21+
22+
- name: Commit changes
23+
run: |
24+
git config --global user.name 'GitHub Actions'
25+
git config --global user.email '[email protected]'
26+
git commit -a -m "Initial setup: remove template files"
27+
git push

README.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,64 @@
1-
# Image template repository
1+
# My Atomic AlmaLinux Respin
2+
3+
Welcome to your brand-new Atomic AlmaLinux Respin!
4+
5+
## Initial Setup
6+
7+
### Set basic configuration
8+
9+
In the ["Build image"](.github/workflows/build.yml) and ["Build ISOs"](.github/workflows/build-iso.yml) jobs, you'll
10+
find a `set-env` job where you can configure several things:
11+
- `REGISTRY`: the registry to push your image to
12+
- `REGISTRY_USER`: your username for this registry
13+
- `IMAGE_PATH`: the path to your image
14+
- `IMAGE_NAME`: your image's name
15+
- `PLATFORMS`: a comma-separated list of platforms for which to build your image, like `"amd64,arm64"`
16+
17+
If your registry is not Github (ie. `ghcr.io`) or you need a specific token to authenticate
18+
to your registry, search those two jobs for the line `REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}`
19+
and replace the token for the appropriate secret.
20+
21+
### Pick a base desktop image
22+
23+
By default, this template configures the base image `quay.io/almalinuxorg/atomic-desktop-gnome:10`,
24+
which is [maintained](https://github.com/AlmaLinux/atomic-desktop) by the [AlmaLinux Atomic SIG](https://wiki.almalinux.org/sigs/Atomic.html).
25+
If you're not a fan of Gnome, you could also pick our KDE image (`quay.io/almalinuxorg/atomic-desktop-kde:10`).
26+
27+
If you'd like to switch images, change the `FROM` line in the [Dockerfile](Dockerfile).
28+
29+
### Setting up Cosign (Optional)
30+
31+
If you'd like to sign your images using Cosign, here's what you need to do:
32+
33+
1. Generate a cosign key:
34+
`podman run --rm -it -v /tmp:/cosign-keys bitnami/cosign generate-key-pair`
35+
Hit enter when asked for a private key password (that is, don't set a password). Once complete, you'll find the new key in `/tmp/cosign.{key,pub}` on your machine.
36+
37+
2. Add `cosign.pub` to this repository as `/cosign.pub`, commit and push. Feel free to publish this file in other places too, it will be needed by everyone to verify the signature of the published images.
38+
39+
3. In the github repo settings, go to "Secrets and variables" in the "Security" subsection and click on "Actions". Create a new Repository secret called `SIGNING_SECRET` and paste the contents of `cosign.key`. Save `cosign.key` in a secure location and delete it from your /tmp directory.
40+
41+
## Customizing your respin
42+
43+
Now that you're all set up, it's time for the fun part!
44+
45+
### Adding files
46+
47+
Any files you place in [`/files/system/`](files/system/) will be added to your image as is,
48+
preserving directory structure and file permissions. This is a simple mechanism for adding
49+
themes, backgrounds, etc.
50+
51+
### Executing commands
52+
53+
In [`/files/scripts/`](files/scripts/), you'll find a series of scripts that will be run
54+
during image creation. The `build.sh` script will first copy all the files from `/files/system/`
55+
into the image, then run the scripts in order, and finally run `cleanup.sh`. You can start by modifying [`10-base.sh`](files/scripts/10-base.sh)
56+
to suit your needs, and add more scripts as needed (always with the naming scheme `XX-whatever.sh`, where XX is a number).
57+
58+
Do not modify `build.sh`, `cleanup.sh`, `90-signing.sh` or `91-image-info.sh` unless you
59+
understand what you're doing, those scripts should not need any customization under normal circumstances.
60+
61+
### Build your new image
62+
63+
Once you've added your files and scripts, commit your changes to let the CI build a new
64+
image for you. You can also run `make image` on your machine to build the image locally.

0 commit comments

Comments
 (0)