Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy Wiki from main repo #128

Merged
merged 33 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e0c8880
copy wiki from main repo
JasonN3 Jul 9, 2024
9d426b5
set branch
JasonN3 Jul 9, 2024
945607b
include workflow itself
JasonN3 Jul 9, 2024
8bf355e
missing curly brace
JasonN3 Jul 9, 2024
b67043a
checkout main repo
JasonN3 Jul 9, 2024
65e87a5
missing end curly brace
JasonN3 Jul 9, 2024
395ed5f
only update for main
JasonN3 Jul 9, 2024
8452800
show what would be found
JasonN3 Jul 9, 2024
67d033a
any branch during testing
JasonN3 Jul 9, 2024
ae57d3e
reverse command
JasonN3 Jul 9, 2024
ab48a37
rename file
JasonN3 Jul 9, 2024
c4051d7
remove extra quotes
JasonN3 Jul 9, 2024
a5f0fd3
add echo
JasonN3 Jul 9, 2024
f9e8302
set to bash
JasonN3 Jul 9, 2024
ca9e034
replace in files
JasonN3 Jul 9, 2024
5e3f189
wrap lines
JasonN3 Jul 9, 2024
0179c97
escape
JasonN3 Jul 9, 2024
6f9a2e0
use semicolons instead
JasonN3 Jul 9, 2024
8fc8681
only remove extension
JasonN3 Jul 9, 2024
9a68f88
remove escaping
JasonN3 Jul 9, 2024
8d32784
missing s
JasonN3 Jul 9, 2024
2a32fba
remove empty directories
JasonN3 Jul 9, 2024
c8d7beb
cleanup debug
JasonN3 Jul 9, 2024
87cb3f1
limit to main
JasonN3 Jul 9, 2024
37ce02c
Apply suggestions from code review
JasonN3 Jul 9, 2024
926b721
more fixes
JasonN3 Jul 9, 2024
f7ac8aa
grammar
JasonN3 Jul 9, 2024
05b44b8
Apply suggestions from code review
JasonN3 Jul 9, 2024
c575461
add fixes
JasonN3 Jul 9, 2024
1efd5f3
move docs to wiki
JasonN3 Aug 20, 2024
f5d3369
fixes
JasonN3 Aug 20, 2024
6349427
use xargs and add usage example
JasonN3 Aug 21, 2024
78fd604
Merge branch 'main' into wiki
JasonN3 Aug 21, 2024
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
50 changes: 50 additions & 0 deletions .github/workflows/update_wiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Update Wiki
on:
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/update_wiki.yml'

jobs:
update-wiki:
name: Update Wiki
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Install packages
run: |
sudo apt install -y make rsync
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
# Checkout Main Repo
- uses: actions/checkout@v2

# Checkout Wiki Repo
- uses: actions/checkout@v2
with:
repository: ${{github.repository}}.wiki
persist-credentials: true
path: wiki
ref: master

# Generate final files
- name: Generate Files
run: |
cd ${GITHUB_WORKSPACE}/docs
make

# Copy Docs
- name: Copy files
run: |
rsync -av --exclude='.git/*' ${GITHUB_WORKSPACE}/docs/ ${GITHUB_WORKSPACE}/wiki/

# Push Changes
- name: Push changes
run: |
cd ${GITHUB_WORKSPACE}/wiki/
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Add changes"
git push
22 changes: 22 additions & 0 deletions docs/Development/Container.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Using the Container

A container with `make install-deps` already run is provided at `ghcr.io/jasonn3/build-container-installer:latest`

To use the container file, run `podman run --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest`.

This will create an ISO with the baked in defaults of the container image. The resulting file will be called `deploy.iso`

See [Customizing](#customizing) for information about customizing the ISO that gets created. The variable can either be defined as environment variables. All variable should be specified CAPITALIZED.
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
Examples:

Building an ISO to install Fedora 39
```bash
podman run --rm --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest VERSION=39 IMAGE_NAME=base IMAGE_TAG=39 VARIANT=Server
```

Building an ISO to install Fedora 40
```bash
podman run --rm --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest VERSION=40 IMAGE_NAME=base IMAGE_TAG=40 VARIANT=Server
```

The same commands are also available using `docker` by replacing `podman` with `docker` in each command.
7 changes: 7 additions & 0 deletions docs/Development/Makefile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Using the Makefile

The Makefile contains all of the commands that are run in the action. There are separate targets for each file generated, however `make` can be used to generate the final image and `make clean` can be used to clean up the workspace. The resulting ISO will be stored in the `build` directory.
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved

`make install-deps` can be used to install the necessary packages
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved

See [Inputs](./..#Inputs) for information about the available parameters. All variable should be specified CAPITALIZED.
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
43 changes: 43 additions & 0 deletions docs/Development/VSCode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Using the VSCode Dev Container

There is a dev container configuration provided for development. By default it will use the existing container image available at `ghcr.io/jasonn3/build-container-installer:latest`, however, you can have it build a new image by editing `.devcontainer/devcontainer.json` and replacing `image` with `build`. `Ctrl+/` can be used to comment and uncomment blocks of code within VSCode.

The code from VSCode will be available at `/workspaces/build-container-installer` once the container has started.
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved

Privileged is required for access to loop devices for lorax.

## Use existing container image:

Check notice on line 9 in docs/Development/VSCode.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docs/Development/VSCode.md#L9

Expected: 1; Actual: 0; Below
```
{
"name": "Existing Dockerfile",
// "build": {
// "context": "..",
// "dockerfile": "../Containerfile",
// "args": {
// "version": "39"
// }
// },
"image": "ghcr.io/jasonn3/build-container-installer:latest",
"overrideCommand": true,
"shutdownAction": "stopContainer",
"privileged": true
}
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
```

## Build a new container image:

Check notice on line 27 in docs/Development/VSCode.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docs/Development/VSCode.md#L27

Expected: 1; Actual: 0; Below
```
{
"name": "Existing Dockerfile",
"build": {
"context": "..",
"dockerfile": "../Containerfile",
"args": {
"version": "39"
}
},
//"image": "ghcr.io/jasonn3/build-container-installer:latest",
"overrideCommand": true,
"shutdownAction": "stopContainer",
"privileged": true
}
```
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
58 changes: 58 additions & 0 deletions docs/Examples/Adding-Flatpaks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Adding Flatpaks

- [Directly using refs](#Directly-using-refs)
- [Using a directory](#Using-a-directory)
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved

## Directly using refs

Check notice on line 6 in docs/Examples/Adding-Flatpaks.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docs/Examples/Adding-Flatpaks.md#L6

Expected: 1; Actual: 0; Below
Action:
Specify the following in your workflow:
```yaml
- name: Build ISO
uses: jasonn3/build-container-installer@main
id: build
with:
flatpak_remote_name: flathub
flatpak_remote_url: https://flathub.org/repo/flathub.flatpakrepo
flatpak_remote_refs: app/org.videolan.VLC/x86_64/stable runtime/org.kde.Platform/x86_64/5.15-23.08
```
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
Podman:
Run the following command:
```bash
podman run --privileged --volume ./:/github/workspace/ ghcr.io/jasonn3/build-container-installer:main \
FLATPAK_REMOTE_NAME=flathub \
FLATPAK_REMOTE_URL=https://flathub.org/repo/flathub.flatpakrepo \
FLATPAK_REMOTE_REFS="app/org.videolan.VLC/x86_64/stable runtime/org.kde.Platform/x86_64/5.15-23.08"
```
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
---
## Using a directory

Check notice on line 27 in docs/Examples/Adding-Flatpaks.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docs/Examples/Adding-Flatpaks.md#L27

Expected: 1; Actual: 0; Above
Action:
1. Create a directory within your GitHub repo named flatpak_refs
1. Create a file within flatpak_refs with the following content
```
app/org.videolan.VLC/x86_64/stable
runtime/org.kde.Platform/x86_64/5.15-23.08
```
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
Specify the following in your workflow:
```yaml
- name: Build ISO
uses: jasonn3/build-container-installer@main
id: build
with:
flatpak_remote_name: flathub
flatpak_remote_url: https://flathub.org/repo/flathub.flatpakrepo
flatpak_remote_refs_dir: /github/workspace/flatpak_refs
```
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
Podman:
1. Create a directory named flatpak_refs
1. Create a file within flatpak_refs with the following content
```
app/org.videolan.VLC/x86_64/stable
runtime/org.kde.Platform/x86_64/5.15-23.08
```
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
Run the following command:
```bash
podman run --privileged --volume ./:/github/workspace/ ghcr.io/jasonn3/build-container-installer:main \
FLATPAK_REMOTE_NAME=flathub \
FLATPAK_REMOTE_URL=https://flathub.org/repo/flathub.flatpakrepo \
FLATPAK_REMOTE_REFS="app/org.videolan.VLC/x86_64/stable runtime/org.kde.Platform/x86_64/5.15-23.08"
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
```
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved
11 changes: 11 additions & 0 deletions docs/Home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Welcome to the build-container-installer wiki!

## Index

- Development
- [Using the Makefile](Development_Makefile)
- [Using the Container](Development_Container)
- [Using the VSCode Dev Container](Development_VSCode)

- Examples
- [Adding Flatpaks](Examples_Adding-Flatpak)
13 changes: 13 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
SHELL = /bin/bash

docs:
find -name '*.md' | while read -r line; \
do \
source_file=$${line:2}; \
final_file=$${source_file//\//_}; \
mv "$${source_file}" "$${final_file}"; \
no_ext_source=$${source_file:0:-3}; \
no_ext_final=$${final_file:0:-3}; \
sed -i "s;($${no_ext_source});($${no_ext_final});g" *.md; \
done
find . -type d -empty -delete
8 changes: 8 additions & 0 deletions docs/_Sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- [Home](Home)
- Development
- [Using the Makefile](Development/Makefile)
- [Using the Container](Development/Container)
- [Using the VSCode Dev Container](Development/VSCode)

- Examples
- [Adding Flatpaks](Examples/Adding-Flatpaks)