Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
f05d33a
Update quay.io/fedora/fedora-bootc Docker tag to v43
renovate[bot] Oct 30, 2025
151b74b
Updates for Fedora 43 build.
CompPhy Oct 30, 2025
f4f1a69
Update quay.io/fedora/fedora-bootc Docker tag to v43
renovate[bot] Oct 30, 2025
3efbe20
Updates for Fedora 43 build.
CompPhy Oct 30, 2025
e7b8be5
Merge branch 'renovate/quay.io-fedora-fedora-bootc-43.x' of https://g…
CompPhy Nov 4, 2025
4921bbd
Update SHA digest.
CompPhy Nov 4, 2025
f6cffb2
Update quay.io/fedora/fedora-bootc Docker tag to v43
renovate[bot] Oct 30, 2025
f4fb678
Updates for Fedora 43 build.
CompPhy Oct 30, 2025
c317867
Updates for Fedora 43 build.
CompPhy Oct 30, 2025
4badd83
Update SHA digest.
CompPhy Nov 4, 2025
821ead6
Merge branch 'renovate/quay.io-fedora-fedora-bootc-43.x' of https://g…
CompPhy Nov 4, 2025
161e908
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 7…
renovate[bot] Nov 28, 2025
ec09fab
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 9…
renovate[bot] Nov 30, 2025
aabe7be
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 4…
renovate[bot] Dec 3, 2025
1b4cb1a
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to d…
renovate[bot] Dec 4, 2025
79aaf5e
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 9…
renovate[bot] Dec 5, 2025
0d7e289
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 2…
renovate[bot] Dec 7, 2025
a5521c1
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 0…
renovate[bot] Dec 10, 2025
e58e28f
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 4…
renovate[bot] Dec 11, 2025
301ada6
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to d…
renovate[bot] Dec 14, 2025
bbde896
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to f…
renovate[bot] Dec 15, 2025
a1caad2
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to a…
renovate[bot] Dec 15, 2025
81d478f
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 3…
renovate[bot] Dec 17, 2025
790ee2b
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 0…
renovate[bot] Dec 17, 2025
5fd686d
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 3…
renovate[bot] Dec 19, 2025
1f112d5
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 4…
renovate[bot] Dec 21, 2025
3cee08a
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 4…
renovate[bot] Dec 23, 2025
5ceb2a7
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 8…
renovate[bot] Dec 25, 2025
a8c8c14
chore(deps): update quay.io/fedora/fedora-bootc:42 docker digest to 5…
renovate[bot] Dec 27, 2025
5419916
Update digest to latest.
CompPhy Dec 27, 2025
5d1cd32
Merge branch 'main' into renovate/quay.io-fedora-fedora-bootc-43.x
CompPhy Dec 27, 2025
f7ec98d
Merge pull request #20 from CompPhy/renovate/quay.io-fedora-fedora-bo…
CompPhy Dec 27, 2025
f63ec57
chore(deps): update bootc-image-builder digest to dc8bd6a
renovate[bot] Dec 27, 2025
403d3da
Merge pull request #162 from CompPhy/renovate/auto-merged-updates
CompPhy Dec 27, 2025
980aa8e
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 4…
renovate[bot] Dec 29, 2025
bf8512e
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 4…
renovate[bot] Dec 30, 2025
3f1c674
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 8…
renovate[bot] Dec 31, 2025
bdf2f60
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to e…
renovate[bot] Jan 2, 2026
14ab0e7
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 9…
renovate[bot] Jan 3, 2026
07877fa
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 2…
renovate[bot] Jan 5, 2026
8f33db7
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to f…
renovate[bot] Jan 6, 2026
578842b
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 7…
renovate[bot] Jan 8, 2026
0faa5a7
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to e…
renovate[bot] Jan 9, 2026
abcbd1a
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 5…
renovate[bot] Jan 11, 2026
086a2bb
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 5…
renovate[bot] Jan 13, 2026
2cd8d66
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 9…
renovate[bot] Jan 14, 2026
57e2a70
Add cleanup for old untagged images.
CompPhy Jan 16, 2026
abe1414
Merge pull request #186 from CompPhy/cleanup
CompPhy Jan 16, 2026
e54a323
Log by digest and cleanup commit hash tags.
CompPhy Jan 16, 2026
4107877
Merge branch 'main' into cleanup
CompPhy Jan 16, 2026
1b29563
Merge pull request #187 from CompPhy/cleanup
CompPhy Jan 16, 2026
639d04a
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to a…
renovate[bot] Jan 17, 2026
bdf1f17
chore(deps): update actions/upload-artifact action to v6
renovate[bot] Jan 17, 2026
02c0f8a
Merge pull request #191 from CompPhy/renovate/main-major-6-github-art…
CompPhy Jan 17, 2026
af37108
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 4…
renovate[bot] Jan 17, 2026
91a146b
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 5…
renovate[bot] Jan 19, 2026
aa1c3cb
chore(deps): update bootc-image-builder digest to 0781de9
renovate[bot] Jan 19, 2026
177fdae
Merge pull request #188 from CompPhy/renovate/auto-merged-updates
CompPhy Jan 19, 2026
0d28d95
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to d…
renovate[bot] Jan 20, 2026
38b23af
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to d…
renovate[bot] Jan 21, 2026
fabc3e2
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 0…
renovate[bot] Jan 22, 2026
b2d75aa
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 6…
renovate[bot] Jan 23, 2026
d326155
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 3…
renovate[bot] Jan 24, 2026
add5b17
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 0…
renovate[bot] Jan 25, 2026
f5c519d
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to c…
renovate[bot] Jan 26, 2026
b3a9669
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to c…
renovate[bot] Jan 28, 2026
4b3a564
Fix columns parsing for deletions.
CompPhy Jan 28, 2026
7e5e3d7
Use awk for better field seperation handling.
CompPhy Jan 28, 2026
d68238d
Fix awk syntax error?
CompPhy Jan 28, 2026
dcfa7cc
Use python since awk is being a pain.
CompPhy Jan 28, 2026
b4d36fb
Merge pull request #213 from CompPhy/cleanup
CompPhy Jan 28, 2026
308a4a5
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 4…
renovate[bot] Jan 28, 2026
46e3c96
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 1…
renovate[bot] Jan 30, 2026
ac46fdf
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 7…
renovate[bot] Jan 31, 2026
43ec217
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 0…
renovate[bot] Feb 1, 2026
0230b17
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 1…
renovate[bot] Feb 3, 2026
3ef099a
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 8…
renovate[bot] Feb 5, 2026
50bca01
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 4…
renovate[bot] Feb 7, 2026
35df340
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 4…
renovate[bot] Feb 9, 2026
f99fa4a
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 3…
renovate[bot] Feb 9, 2026
58f99a6
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 1…
renovate[bot] Feb 11, 2026
d6abf65
chore(deps): update bootc-image-builder digest to 410e3c7
renovate[bot] Feb 11, 2026
34472fe
Merge pull request #233 from CompPhy/renovate/auto-merged-updates
CompPhy Feb 12, 2026
83712e5
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 7…
renovate[bot] Feb 14, 2026
99776c7
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 0…
renovate[bot] Feb 16, 2026
762379f
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 3…
renovate[bot] Feb 17, 2026
3baa9c0
Add wireguard-tools.
CompPhy Feb 20, 2026
70034ca
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 6…
renovate[bot] Feb 20, 2026
f9e6e97
Merge pull request #243 from CompPhy/renovate/main-quay.iofedorafedor…
CompPhy Feb 20, 2026
e1fd58f
Merge branch 'main' into wireguard
CompPhy Feb 20, 2026
239039f
Merge pull request #242 from CompPhy/wireguard
CompPhy Feb 20, 2026
6fdff52
Don't use this PR check, it can block build of legit PR's.
CompPhy Feb 20, 2026
31a70ba
Merge pull request #245 from CompPhy/wireguard
CompPhy Feb 20, 2026
87ad397
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 5…
renovate[bot] Feb 23, 2026
ff18c5d
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 4…
renovate[bot] Feb 25, 2026
793602e
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 5…
renovate[bot] Feb 26, 2026
810cff5
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to f…
renovate[bot] Feb 28, 2026
17f9bde
chore(deps): update actions/upload-artifact action to v7
renovate[bot] Feb 28, 2026
fa864ec
Merge pull request #252 from CompPhy/renovate/main-major-7-github-art…
CompPhy Feb 28, 2026
064f40c
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 5…
renovate[bot] Feb 28, 2026
43aab00
Merge pull request #254 from CompPhy/renovate/main-quay.iofedorafedor…
CompPhy Feb 28, 2026
1e3731a
Add solaar for logitech mice.
CompPhy Feb 28, 2026
d322691
Reduce build time a little.
CompPhy Feb 28, 2026
3c5dce8
Merge pull request #253 from CompPhy/solaar
CompPhy Feb 28, 2026
f81f1ce
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 3…
renovate[bot] Mar 3, 2026
fcd7999
Merge branch 'main' into renovate/auto-merged-updates
CompPhy Mar 4, 2026
ffa472b
Build on bootc-image-builder updates.
CompPhy Mar 4, 2026
ff43650
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 4…
renovate[bot] Mar 5, 2026
f61ba8e
Merge branch 'main' into renovate/auto-merged-updates
CompPhy Mar 5, 2026
2ca73b5
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 5…
renovate[bot] Mar 5, 2026
fd0c85b
Merge pull request #260 from CompPhy/renovate/main-quay.iofedorafedor…
CompPhy Mar 5, 2026
555b284
Merge branch 'main' into renovate/auto-merged-updates
CompPhy Mar 5, 2026
f1449d5
Merge pull request #256 from CompPhy/renovate/auto-merged-updates
CompPhy Mar 5, 2026
0d951eb
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 0…
renovate[bot] Mar 7, 2026
1194549
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 4…
renovate[bot] Mar 8, 2026
15d4598
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to 9…
renovate[bot] Mar 10, 2026
e3b5973
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to f…
renovate[bot] Mar 11, 2026
bb4f24c
chore(deps): update bootc-image-builder digest to ee18461
renovate[bot] Mar 12, 2026
abc7daa
Print debug information.
CompPhy Mar 12, 2026
844169d
Need comma.
CompPhy Mar 12, 2026
a77d7bf
chore(deps): update quay.io/fedora/fedora-bootc:43 docker digest to f…
renovate[bot] Mar 12, 2026
3859dd9
Merge branch 'main' into cleanup
CompPhy Mar 12, 2026
88fbdb4
Remove for syntax errors.
CompPhy Mar 12, 2026
c55738a
More debug information to see why API calls are failing.
CompPhy Mar 12, 2026
57f61fd
Merge pull request #272 from CompPhy/cleanup
CompPhy Mar 12, 2026
26ecdf8
The "owner" call here is slightly incorrect.
CompPhy Mar 12, 2026
63a6061
Merge pull request #273 from CompPhy/cleanup
CompPhy Mar 12, 2026
d4ee24a
Merge branch 'main' into renovate/auto-merged-updates
CompPhy Mar 12, 2026
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
54 changes: 54 additions & 0 deletions .github/scripts/perform_deletions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env python3
"""Parse candidates.txt (TAB-separated, preserves empty fields) and perform deletions.
Reads environment variables: DRY_RUN, OWNER, PACKAGE, GITHUB_TOKEN.
This version reads the header (a # comment line) to determine column order
so it matches the workflow's output exactly.
"""
import os
import subprocess
import sys

DRY_RUN = os.environ.get("DRY_RUN", "true").lower() == "true"
OWNER = os.environ.get("OWNER")
PACKAGE = os.environ.get("PACKAGE")
GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN")

if OWNER is None or PACKAGE is None:
print("Missing OWNER or PACKAGE environment variables; aborting.")
raise SystemExit(1)

print(f"DRY_RUN={DRY_RUN}, OWNER={OWNER}, PACKAGE={PACKAGE}")

path = "candidates.txt"
if not os.path.exists(path):
print(f"{path} not found; aborting.")
raise SystemExit(1)

with open(path, "r", newline="") as f:
for raw in f:
line = raw.rstrip("\n")
if not line or line.startswith("#"):
continue
fields = line.split("\t")
if len(fields) < 4:
continue
# Workflow writes: id, digest, created_at, selected
id_, digest, created, selected = fields[0], fields[1], fields[2], fields[3]

if selected == 'yes':
if DRY_RUN:
print(f"[dry-run] Would delete package version (id: {id_}) (digest: {digest}) (created: {created})")
else:
print(f"Deleting package version (id: {id_}) (digest: {digest}) (created: {created})")
cmd = [
'curl', '-s', '-L','-X', 'DELETE',
'-H', f'Authorization: Bearer {GITHUB_TOKEN}',
'-H', 'Accept: application/vnd.github+json',
f'https://api.github.com/users/{OWNER}/packages/container/{PACKAGE}/versions/{id_}',
]
try:
subprocess.run(cmd, check=False)
except Exception as e:
print('Warning: curl failed:', e)
else:
print(f"Candidate (id: {id_}) (created: {created}) is not older than 30 days; skipping")
174 changes: 174 additions & 0 deletions .github/workflows/cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
permissions:
contents: read
packages: write
name: Cleanup old untagged GHCR images.
on:
schedule:
# Runs weekly on Sunday at 00:00 UTC
- cron: '0 0 * * 0'
workflow_dispatch:
inputs:
dry_run:
description: 'If "true", perform a dry-run (no deletes). Manual runs default to dry-run for safety.'
required: false
default: 'true'
jobs:
cleanup:
name: Cleanup untagged GHCR images older than 30 days
runs-on: ubuntu-latest
# Ensure scheduled runs only execute on `main`; allow manual dispatch on any branch
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.ref == 'refs/heads/main')
env:
IMAGE_NAME: framework-fedora-bootc
# For scheduled runs DRY_RUN will be 'false'. For manual dispatch, the input controls it.
DRY_RUN: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run) || 'false' }}
steps:
- name: Checkout (for context)
uses: actions/checkout@v6

- name: Install jq
run: |
sudo apt-get update;
sudo apt-get install -y jq
- name: Gather candidate versions
id: gather
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
PACKAGE: ${{ env.IMAGE_NAME }}
run: |
set -euo pipefail
out=candidates.txt
# Log uses id first (stable key); digest is included for visibility.
printf '# id\tdigest\tcreated_at\tselected\n' > "$out"
# Determine whether owner is an Organization or User
owner_type=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/users/$OWNER" | jq -r '.type')
if [ "$owner_type" = "Organization" ]; then
base="orgs/$OWNER"
else
base="users/$OWNER"
fi

per_page=100
page=1
cutoff_ts=$(date -d "30 days ago" +%s)
while :; do
url="https://api.github.com/${base}/packages/container/${PACKAGE}/versions?per_page=${per_page}&page=${page}"
resp=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github+json" "$url")
count=$(echo "$resp" | jq 'length')
if [ "$count" -eq 0 ]; then
break
fi

# For each version, decide whether it's a candidate:
# - No tags => candidate
# - Tags exist and ALL tags look like commit hashes (7-40 hex chars) => candidate
# - Otherwise skip
echo "$resp" | jq -c '.[]' | while read -r item; do
id=$(echo "$item" | jq -r '.id')
digest=$(echo "$item" | jq -r '.metadata.container.digest // empty')
created=$(echo "$item" | jq -r '.created_at')
created_ts=$(date -d "$created" +%s)

# gather tags as space-separated list
tags=$(echo "$item" | jq -r '.metadata.container.tags // [] | join(" ")')

consider=false
if [ -z "$tags" ]; then
consider=true
else
# check whether ALL tags look like commit hashes (7-40 hex chars)
all_hashes=true
for t in $tags; do
if ! [[ "$t" =~ ^[0-9a-fA-F]{40}$ ]]; then
all_hashes=false
break
fi
done
if [ "$all_hashes" = true ]; then
consider=true
fi
fi

if [ "$consider" = true ]; then
if [ "$created_ts" -lt "$cutoff_ts" ]; then
selected=yes
else
selected=no
fi
# Write id first (stable key), then digest, created, selected
printf "%s\t%s\t%s\t%s\n" "$id" "$digest" "$created" "$selected" >> "$out"
fi
done

page=$((page+1))
done

# Add a summary header with counts selected vs total
total=$(tail -n +2 "$out" | wc -l | tr -d ' ')
# selected is now the 4th column
selected_count=$(tail -n +2 "$out" | awk -F $'\t' '$4=="yes"{c++}END{print c+0}')
not_selected=$((total - selected_count))
tmp="${out}.tmp"
printf '# summary: selected=%s\tnot_selected=%s\ttotal=%s\n' "$selected_count" "$not_selected" "$total" > "$tmp"
cat "$out" >> "$tmp"
mv "$tmp" "$out"

echo "Collected candidate versions (with summary):"
cat "$out"

- name: Upload candidate list artifact
uses: actions/upload-artifact@v7
with:
name: ghcr-candidates-${{ github.run_id }}
path: candidates.txt

- name: Post summary to PR (if running in a PR context)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name || github.repository }}
RUN_ID: ${{ github.run_id }}
run: |
set -euo pipefail
# Try to find a PR associated with this run/commit
pr_number=""
# First, check if event payload has pull_request
if [ "${GITHUB_EVENT_NAME:-}" = "pull_request" ]; then
pr_number=$(jq -r .pull_request.number < "$GITHUB_EVENT_PATH" || true)
fi
# If not found, try commits -> pulls API
if [ -z "$pr_number" ]; then
resp=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github+json" "https://api.github.com/repos/${OWNER}/${REPO}/commits/${GITHUB_SHA}/pulls")
pr_number=$(echo "$resp" | jq -r '.[0].number // empty')
fi

if [ -z "$pr_number" ]; then
echo "No PR found for this run/commit; skipping PR comment."
exit 0
fi

# Read the summary header from candidates.txt (first line)
summary_line=$(head -n 1 candidates.txt || true)
# Build the comment body with printf to avoid YAML/heredoc parsing issues in editors
printf -v body 'Cleanup candidates summary (run %s):\n\n%s\n\nCandidate list artifact: ghcr-candidates-%s\n\nSee the artifact for the full list of candidate versions (id, created_at, selected).' \
"$RUN_ID" "$summary_line" "$RUN_ID"

echo "Posting summary to PR #${pr_number}"
curl -s -X POST -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github+json" \
-d "{\"body\": $(jq -Rn --arg str "$body" '$str') }" \
"https://api.github.com/repos/${OWNER}/${REPO}/issues/${pr_number}/comments" > /dev/null

- name: Perform deletions (reads candidate list)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRY_RUN: ${{ env.DRY_RUN }}
PACKAGE: ${{ env.IMAGE_NAME }}
OWNER: ${{ github.repository_owner }}
run: |
set -euo pipefail
echo "DRY_RUN=${DRY_RUN}"
# Use an embedded Python script to parse TAB-separated fields (preserves empty fields)
# and perform deletions (or dry-run messages). This avoids awk quoting/syntax issues.
# Call the deletion helper script (keeps workflow YAML clean)
python3 .github/scripts/perform_deletions.py
25 changes: 1 addition & 24 deletions .github/workflows/main-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,9 @@ concurrency:
cancel-in-progress: true

jobs:
pr-check:
name: Check for open PR for this commit
runs-on: ubuntu-latest
outputs:
has_pr: ${{ steps.check.outputs.has_pr }}
steps:
- name: Check for PRs referencing this commit
id: check
run: |
# Query GitHub API for pull requests that include this commit
resp=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/${GITHUB_REPOSITORY}/commits/${GITHUB_SHA}/pulls")
count=$(echo "$resp" | python -c "import sys,json; print(len(json.load(sys.stdin)))")
if [ "$count" -gt 0 ]; then
echo "has_pr=true" >> $GITHUB_OUTPUT
else
echo "has_pr=false" >> $GITHUB_OUTPUT
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build:
name: Build and publish image
runs-on: ubuntu-latest
needs: pr-check
if: needs.pr-check.outputs.has_pr == 'false'
env:
IMAGE_NAME: framework-fedora-bootc
REGISTRY: ghcr.io/compphy
Expand All @@ -59,8 +37,7 @@ jobs:
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
# On main tag both 'latest' and '42'; on release-42 tag '42'.
tags: ${{ github.ref == 'refs/heads/main' && 'latest 42 ' || (github.ref == 'refs/heads/release-42' && '42 ' || '') }}${{ github.sha }}
tags: ${{ github.ref == 'refs/heads/release-42' && '42 ' || 'latest 43 ' }}${{ github.sha }}
layers: True
containerfiles: |
./Containerfile
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
paths:
- Containerfile
- .github/workflows/pr-build.yaml
- bootc-image-builder

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -36,4 +37,4 @@ jobs:
image: ${{ env.IMAGE_NAME }}
layers: True
containerfiles: |
./Containerfile
./Containerfile
10 changes: 4 additions & 6 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM quay.io/fedora/fedora-bootc:42@sha256:d82d8363bd69d668eb48e64cdfae23b5e6c5de9305a0bf01ad07505fab3454b5 AS builder
FROM quay.io/fedora/fedora-bootc:43@sha256:f804bd7a5c680b65e77ce7272cf0f04ca77e049f836df4e9added920fc733fcc AS builder
# https://bugzilla.redhat.com/show_bug.cgi?id=2381864
RUN dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-77e737a366
RUN dnf install -y --exclude rootfiles @kde-desktop-environment @development-tools @container-management @system-tools @games; dnf clean all
RUN dnf upgrade -y --refresh
RUN dnf install -y --exclude rootfiles @kde-desktop-environment @development-tools @container-management @system-tools @games && dnf clean all
RUN systemctl disable abrtd atd mcelog
RUN systemctl set-default graphical.target
RUN ln -snf ../usr/share/zoneinfo/America/New_York /etc/localtime
Expand All @@ -10,9 +10,7 @@ RUN bootc container lint

FROM builder
COPY files/vscode.repo /etc/yum.repos.d/
RUN dnf install -y code firefox terminator && dnf clean all
RUN dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
RUN dnf config-manager setopt fedora-cisco-openh264.enabled=1
RUN dnf install -y steam && dnf clean all
RUN dnf install -y code firefox terminator wireguard-tools steam solaar && dnf clean all
RUN bootc container lint

7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OCI_IMAGE ?= ghcr.io/compphy/framework-fedora-bootc:latest
DISK_TYPE ?= anaconda-iso
OCI_IMAGE ?= ghcr.io/compphy/framework-fedora-bootc:latest
DISK_TYPE ?= raw
ROOTFS ?= ext4
ARCH ?= amd64
# Use upsteam build:
Expand All @@ -10,6 +10,7 @@ BIB_IMAGE ?= localhost/bootc-image-builder:latest
# See https://github.com/osbuild/bootc-image-builder
.PHONY: disk-image
disk-image:
podman build -t framework-fedora-bootc $(CURDIR)
podman build -t bootc-image-builder $(CURDIR)/bootc-image-builder
mkdir -p ./output
mkdir -p /var/lib/containers/storage
Expand All @@ -28,4 +29,4 @@ disk-image:
--type $(DISK_TYPE) \
--rootfs $(ROOTFS) \
--use-librepo \
$(OCI_IMAGE)
localhost/framework-fedora-bootc:latest
Loading