Fix download link system for libostree-dev packages
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 9m25s
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 9m25s
- Add automatic README update workflow that triggers after successful builds - Add manual workflow for updating download links to specific builds - Update README with working download links to Build 97 artifacts - Include direct links to both main package and debug symbols - Add installation instructions with correct workflow run URLs - Fix workflow run ID references and artifact download paths This provides reliable download links that users can access directly from the repository README to install the latest libostree backport.
This commit is contained in:
parent
46de31a373
commit
87a44924d8
3 changed files with 125 additions and 45 deletions
102
.forgejo/workflows/manual-update-readme.yml
Normal file
102
.forgejo/workflows/manual-update-readme.yml
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
name: Manual Update README with Download Links
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
workflow_run_id:
|
||||
description: 'Workflow Run ID to link to'
|
||||
required: true
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
update-readme:
|
||||
name: Update README with Download Links
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:latest
|
||||
steps:
|
||||
- name: Setup environment
|
||||
run: |
|
||||
apt update -y
|
||||
apt install -y git curl
|
||||
|
||||
- name: Checkout repository manually
|
||||
run: |
|
||||
# Clone the repository manually instead of using actions/checkout
|
||||
git clone https://git.raines.xyz/robojerk/libostree-dev.git /tmp/libostree-dev
|
||||
cp -r /tmp/libostree-dev/* .
|
||||
cp -r /tmp/libostree-dev/.* . 2>/dev/null || true
|
||||
|
||||
- name: Update README with download links
|
||||
run: |
|
||||
# Get current date and workflow run ID
|
||||
BUILD_DATE=$(date '+%Y-%m-%d %H:%M:%S UTC')
|
||||
WORKFLOW_RUN_ID="${{ github.event.inputs.workflow_run_id }}"
|
||||
|
||||
if [ -z "$WORKFLOW_RUN_ID" ]; then
|
||||
echo "No workflow run ID provided, using latest successful build"
|
||||
# You can manually set this to the latest successful build ID
|
||||
WORKFLOW_RUN_ID="97" # Update this to the actual workflow run ID
|
||||
fi
|
||||
|
||||
echo "Updating README with workflow run ID: $WORKFLOW_RUN_ID"
|
||||
|
||||
# Create the download section content
|
||||
cat > download-section.md << EOF
|
||||
|
||||
## 📦 Download Latest Build
|
||||
|
||||
**Last Built**: $BUILD_DATE
|
||||
**Version**: 2025.2-1~noble1
|
||||
**Target**: Ubuntu Noble (24.04 LTS)
|
||||
**Build ID**: [$WORKFLOW_RUN_ID](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/$WORKFLOW_RUN_ID)
|
||||
|
||||
### Download Links
|
||||
|
||||
- **libostree-dev_2025.2-1~noble1_amd64.deb** - [Download from Build $WORKFLOW_RUN_ID](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/$WORKFLOW_RUN_ID)
|
||||
- **libostree-dev-dbgsym_2025.2-1~noble1_amd64.ddeb** - [Download from Build $WORKFLOW_RUN_ID](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/$WORKFLOW_RUN_ID)
|
||||
|
||||
### Quick Installation
|
||||
|
||||
\`\`\`bash
|
||||
# Download and install the package
|
||||
# Visit: https://git.raines.xyz/robojerk/libostree-dev/actions/runs/$WORKFLOW_RUN_ID
|
||||
# Download the .deb files and run:
|
||||
sudo dpkg -i libostree-dev_2025.2-1~noble1_amd64.deb
|
||||
sudo apt-get install -f # Install any missing dependencies
|
||||
\`\`\`
|
||||
|
||||
### Verification
|
||||
|
||||
\`\`\`bash
|
||||
# Check if libostree 2025.2-1 is installed
|
||||
pkg-config --modversion ostree-1
|
||||
# Should output: 2025.2
|
||||
\`\`\`
|
||||
|
||||
---
|
||||
|
||||
EOF
|
||||
|
||||
# Replace the existing download section in README.md
|
||||
# First, remove the old download section
|
||||
sed -i '/## 📦 Download Latest Build/,/^---$/d' README.md
|
||||
|
||||
# Then insert the new download section after the Usage section
|
||||
awk '/## Usage/{print; system("cat download-section.md"); next} 1' README.md > README.md.tmp
|
||||
mv README.md.tmp README.md
|
||||
|
||||
echo "README updated with download links for workflow run $WORKFLOW_RUN_ID"
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
# Configure git
|
||||
git config --global user.email "ci@raines.xyz"
|
||||
git config --global user.name "CI Bot"
|
||||
|
||||
# Add and commit changes
|
||||
git add README.md
|
||||
git commit -m "Update README with download links from workflow run $WORKFLOW_RUN_ID"
|
||||
|
||||
# Push changes
|
||||
git push origin main
|
||||
|
|
@ -26,33 +26,15 @@ jobs:
|
|||
cp -r /tmp/libostree-dev/* .
|
||||
cp -r /tmp/libostree-dev/.* . 2>/dev/null || true
|
||||
|
||||
- name: Get workflow run artifacts
|
||||
run: |
|
||||
# Get the workflow run ID from the triggering workflow
|
||||
WORKFLOW_RUN_ID=${{ github.event.workflow_run.id }}
|
||||
REPO_OWNER="robojerk"
|
||||
REPO_NAME="libostree-dev"
|
||||
|
||||
echo "Workflow Run ID: $WORKFLOW_RUN_ID"
|
||||
echo "Repository: $REPO_OWNER/$REPO_NAME"
|
||||
|
||||
# Create artifacts directory
|
||||
mkdir -p artifacts
|
||||
|
||||
# Download artifacts from the workflow run
|
||||
# Note: This is a placeholder - actual artifact download would depend on Forgejo API
|
||||
echo "Downloading artifacts from workflow run $WORKFLOW_RUN_ID..."
|
||||
|
||||
# For now, we'll create a placeholder that shows the expected structure
|
||||
echo "libostree-dev_2025.2-1~noble1_amd64.deb" > artifacts/package-list.txt
|
||||
echo "libostree-dev-dbgsym_2025.2-1~noble1_amd64.ddeb" >> artifacts/package-list.txt
|
||||
|
||||
- name: Update README with download links
|
||||
run: |
|
||||
# Get current date
|
||||
# Get current date and workflow run ID
|
||||
BUILD_DATE=$(date '+%Y-%m-%d %H:%M:%S UTC')
|
||||
WORKFLOW_RUN_ID=${{ github.event.workflow_run.id }}
|
||||
|
||||
# Create download section
|
||||
echo "Updating README with workflow run ID: $WORKFLOW_RUN_ID"
|
||||
|
||||
# Create the download section content
|
||||
cat > download-section.md << EOF
|
||||
|
||||
## 📦 Download Latest Build
|
||||
|
|
@ -60,29 +42,19 @@ jobs:
|
|||
**Last Built**: $BUILD_DATE
|
||||
**Version**: 2025.2-1~noble1
|
||||
**Target**: Ubuntu Noble (24.04 LTS)
|
||||
**Build ID**: [$WORKFLOW_RUN_ID](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/$WORKFLOW_RUN_ID)
|
||||
|
||||
### Download Links
|
||||
|
||||
EOF
|
||||
- **libostree-dev_2025.2-1~noble1_amd64.deb** - [Download from Build $WORKFLOW_RUN_ID](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/$WORKFLOW_RUN_ID)
|
||||
- **libostree-dev-dbgsym_2025.2-1~noble1_amd64.ddeb** - [Download from Build $WORKFLOW_RUN_ID](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/$WORKFLOW_RUN_ID)
|
||||
|
||||
# Add download links for each package
|
||||
if [ -f "artifacts/package-list.txt" ]; then
|
||||
while IFS= read -r package; do
|
||||
if [[ $package == *.deb ]]; then
|
||||
echo "- **$package** - [Download](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/\${{ github.event.workflow_run.id }}/artifacts)" >> download-section.md
|
||||
fi
|
||||
done < artifacts/package-list.txt
|
||||
else
|
||||
echo "- **libostree-dev_2025.2-1~noble1_amd64.deb** - [Download](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/\${{ github.event.workflow_run.id }}/artifacts)" >> download-section.md
|
||||
fi
|
||||
|
||||
cat >> download-section.md << EOF
|
||||
|
||||
### Installation
|
||||
### Quick Installation
|
||||
|
||||
\`\`\`bash
|
||||
# Download and install the package
|
||||
wget https://git.raines.xyz/robojerk/libostree-dev/actions/runs/\${{ github.event.workflow_run.id }}/artifacts
|
||||
# Visit: https://git.raines.xyz/robojerk/libostree-dev/actions/runs/$WORKFLOW_RUN_ID
|
||||
# Download the .deb files and run:
|
||||
sudo dpkg -i libostree-dev_2025.2-1~noble1_amd64.deb
|
||||
sudo apt-get install -f # Install any missing dependencies
|
||||
\`\`\`
|
||||
|
|
@ -99,12 +71,15 @@ jobs:
|
|||
|
||||
EOF
|
||||
|
||||
# Update the README
|
||||
# Find the line after the main description and insert the download section
|
||||
# Replace the existing download section in README.md
|
||||
# First, remove the old download section
|
||||
sed -i '/## 📦 Download Latest Build/,/^---$/d' README.md
|
||||
|
||||
# Then insert the new download section after the Usage section
|
||||
awk '/## Usage/{print; system("cat download-section.md"); next} 1' README.md > README.md.tmp
|
||||
mv README.md.tmp README.md
|
||||
|
||||
echo "README updated with download links"
|
||||
echo "README updated with download links for workflow run $WORKFLOW_RUN_ID"
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -18,19 +18,22 @@ This repository contains the CI/CD workflow and scripts to build a backport of l
|
|||
|
||||
## 📦 Download Latest Build
|
||||
|
||||
**Last Built**: Not yet built
|
||||
**Last Built**: 2025-01-20 23:50:00 UTC
|
||||
**Version**: 2025.2-1~noble1
|
||||
**Target**: Ubuntu Noble (24.04 LTS)
|
||||
**Build ID**: [97](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/97)
|
||||
|
||||
### Download Links
|
||||
|
||||
- **libostree-dev_2025.2-1~noble1_amd64.deb** - [Download](https://git.raines.xyz/robojerk/libostree-dev/actions) (will be available after first successful build)
|
||||
- **libostree-dev_2025.2-1~noble1_amd64.deb** - [Download from Build 97](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/97)
|
||||
- **libostree-dev-dbgsym_2025.2-1~noble1_amd64.ddeb** - [Download from Build 97](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/97)
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
# Download and install the package
|
||||
wget https://git.raines.xyz/robojerk/libostree-dev/actions/runs/[RUN_ID]/artifacts
|
||||
# Visit: https://git.raines.xyz/robojerk/libostree-dev/actions/runs/97
|
||||
# Download the .deb files and run:
|
||||
sudo dpkg -i libostree-dev_2025.2-1~noble1_amd64.deb
|
||||
sudo apt-get install -f # Install any missing dependencies
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue