You've already forked armbian.github.io
mirror of
https://github.com/armbian/armbian.github.io.git
synced 2026-01-06 11:42:20 -08:00
Fetch Armbian kernel package versions from beta repository (#67)
* Extract kernel info from repository * Update .github/workflows/repository-status.yaml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * AI suggestions * Cleanup * Update readme * Update README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Align numbers to right --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
4
.github/workflows/generate-jira-excerpt.yml
vendored
4
.github/workflows/generate-jira-excerpt.yml
vendored
@@ -43,8 +43,8 @@ jobs:
|
||||
git diff --cached --quiet || git commit -m "Update WEB indes files"
|
||||
git push
|
||||
|
||||
- name: "Run base-files update action"
|
||||
- name: "Run pull from Repository action"
|
||||
uses: peter-evans/repository-dispatch@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
event-type: "Bigin update"
|
||||
event-type: "Repository status"
|
||||
|
||||
13
.github/workflows/generate-motd.yaml
vendored
13
.github/workflows/generate-motd.yaml
vendored
@@ -1,6 +1,5 @@
|
||||
name: "Generate motd for Linux OS"
|
||||
on:
|
||||
push:
|
||||
repository_dispatch:
|
||||
types: ["MOTD update"]
|
||||
|
||||
@@ -11,7 +10,7 @@ concurrency:
|
||||
jobs:
|
||||
jira:
|
||||
runs-on: ubuntu-24.04
|
||||
name: "Get from Armbian Jira"
|
||||
name: "Generate MOTD"
|
||||
steps:
|
||||
|
||||
- name: Checkout repository
|
||||
@@ -46,8 +45,8 @@ jobs:
|
||||
git diff --cached --quiet || git commit -m "Update WEB indes files"
|
||||
git push
|
||||
|
||||
# - name: "Run base-files update action"
|
||||
# uses: peter-evans/repository-dispatch@v3
|
||||
# with:
|
||||
# token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# event-type: "Base files"
|
||||
- name: "Run Bigin update action"
|
||||
uses: peter-evans/repository-dispatch@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
event-type: "Bigin update"
|
||||
79
.github/workflows/repository-status.yaml
vendored
Normal file
79
.github/workflows/repository-status.yaml
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
name: "Fetch Armbian kernel package versions"
|
||||
on:
|
||||
push:
|
||||
repository_dispatch:
|
||||
types: ["Repository status"]
|
||||
|
||||
concurrency:
|
||||
group: redirector
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
jira:
|
||||
runs-on: ubuntu-24.04
|
||||
name: "Get from Armbian Repository"
|
||||
steps:
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
path: armbian.github.io
|
||||
|
||||
- name: Get info from Armbian repository
|
||||
run: |
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
KEYRING="/usr/share/keyrings/armbian.gpg"
|
||||
LIST="/etc/apt/sources.list.d/armbian.list"
|
||||
|
||||
# Import Armbian APT key
|
||||
curl -fsSL https://apt.armbian.com/armbian.key | sudo gpg --dearmor -o "$KEYRING"
|
||||
sudo chmod go+r "$KEYRING"
|
||||
|
||||
# Detect release codename (Ubuntu/Debian)
|
||||
. /etc/os-release
|
||||
RELEASE="${UBUNTU_CODENAME:-${VERSION_CODENAME}}"
|
||||
|
||||
# Add Armbian repo
|
||||
ARCH="$(dpkg --print-architecture)"
|
||||
echo "deb [arch=$ARCH signed-by=$KEYRING] https://beta.armbian.com $RELEASE main ${RELEASE}-utils ${RELEASE}-desktop" \
|
||||
| sudo tee "$LIST" > /dev/null
|
||||
|
||||
sudo apt-get update -qq
|
||||
|
||||
CURRENT=$(apt search --names-only 'linux-image-current-x86' 2> /dev/null | grep Armbian | grep -oE "(\w*[.]\w*)*" | head -1)
|
||||
EDGE=$(apt search --names-only 'linux-image-edge-x86' 2> /dev/null | grep Armbian | grep -oE "(\w*[.]\w*)*" | head -1)
|
||||
if [[ -z "${CURRENT}" || -z "${EDGE}" ]]; then
|
||||
echo "Failed to determine CURRENT/EDGE versions" >&2
|
||||
exit 1
|
||||
fi
|
||||
# Generate badges
|
||||
sed "s/{{VERSION}}/$CURRENT/g" armbian.github.io/templates/armbian-badge-current.svg > current.svg
|
||||
sed "s/{{VERSION}}/$EDGE/g" armbian.github.io/templates/armbian-badge-edge.svg > edge.svg
|
||||
|
||||
# Write JSON for other usage
|
||||
printf '{\n "CURRENT": "%s",\n "EDGE": "%s"\n}\n' "${CURRENT:-}" "${EDGE:-}" > kernel-versions.json
|
||||
|
||||
- name: Commit changes if any
|
||||
run: |
|
||||
|
||||
cd armbian.github.io
|
||||
git fetch origin data || true
|
||||
git checkout data
|
||||
mkdir -p data/
|
||||
mv ${{ github.workspace }}/current.svg data/
|
||||
mv ${{ github.workspace }}/edge.svg data/
|
||||
mv ${{ github.workspace }}/kernel-versions.json data/
|
||||
git config --global user.name "github-actions"
|
||||
git config --global user.email "github-actions@github.com"
|
||||
git add data/.
|
||||
git diff --cached --quiet || git commit -m "Update repository data"
|
||||
git push
|
||||
|
||||
- name: "Run Bigin update action"
|
||||
uses: peter-evans/repository-dispatch@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
event-type: "MOTD update"
|
||||
@@ -65,6 +65,10 @@ It also produces [data exchange files](https://github.armbian.com/) used for aut
|
||||
<a href=https://github.com/armbian/armbian.github.io/actions/workflows/generate-jira-excerpt.yml><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/armbian/armbian.github.io/generate-jira-excerpt.yml?logo=githubactions&label=Status&style=for-the-badge&branch=main&logoColor=white"></a>
|
||||
Extracts metadata and summaries from public Jira issues.
|
||||
|
||||
- **Fetch Armbian Kernel Package Versions**
|
||||
<a href=https://github.com/armbian/armbian.github.io/actions/workflows/repository-status.yaml><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/armbian/armbian.github.io/repository-status.yaml?logo=githubactions&label=Status&style=for-the-badge&branch=main&logoColor=white"></a>
|
||||
Fetches the latest CURRENT and EDGE kernel package versions from Armbian's beta repository and generates SVG badges and a JSON file.
|
||||
|
||||
### Infrastructure & Community
|
||||
|
||||
- **Mirror GitHub Artifacts to CDN**
|
||||
|
||||
22
templates/armbian-badge-current.svg
Normal file
22
templates/armbian-badge-current.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 25 KiB |
22
templates/armbian-badge-edge.svg
Normal file
22
templates/armbian-badge-edge.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 25 KiB |
Reference in New Issue
Block a user