Simplify CI/CD workflows for Forgejo compatibility
Some checks failed
Build Packages / Build libostree Backport (push) Failing after 0s
Build Packages / Build bootc Package (push) Has been skipped
Build Packages / Create Combined Artifacts (push) Has been skipped
Test Build / Test bootc Build (with existing libostree) (push) Failing after 0s

This commit is contained in:
robojerk 2025-07-20 23:34:40 +00:00
parent 695714a60e
commit 4a9c19ef1c
3 changed files with 46 additions and 179 deletions

View file

@ -23,131 +23,52 @@ jobs:
name: release-assets
path: /tmp/artifacts
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Generate download links
- name: Generate download section
run: |
python3 << 'EOF'
import os
import re
from datetime import datetime
echo "## 📦 Latest Packages" > /tmp/download_section.md
echo "" >> /tmp/download_section.md
echo "> **Note**: These packages are automatically built by CI/CD." >> /tmp/download_section.md
echo "" >> /tmp/download_section.md
# Get artifact files
artifact_dir = "/tmp/artifacts"
files = []
if os.path.exists(artifact_dir):
for file in os.listdir(artifact_dir):
if file.endswith('.deb'):
files.append(file)
# Generate download links
base_url = f"https://github.com/{os.environ['GITHUB_REPOSITORY']}/actions/runs/{os.environ['GITHUB_RUN_ID']}/artifacts"
print("## 📦 Latest Packages")
print()
print("> **Note**: These packages are automatically built by CI/CD. For the latest version, check the [Actions tab](https://github.com/$GITHUB_REPOSITORY/actions).")
print()
if files:
print("### Download Links")
print()
print("| Package | Download |")
print("|---------|----------|")
for file in sorted(files):
if 'libostree' in file:
package_name = "libostree Backport"
elif 'bootc' in file:
package_name = "bootc"
else:
package_name = file
print(f"| {package_name} | [{file}]({base_url}) |")
print()
print("### Installation Instructions")
print()
print("```bash")
print("# Download and install libostree backport first")
print("wget <libostree-package-url>")
print("sudo dpkg -i <libostree-package-name>.deb")
print("sudo apt --fix-broken install -y")
print()
print("# Then install bootc")
print("wget <bootc-package-url>")
print("sudo dpkg -i <bootc-package-name>.deb")
print("sudo apt --fix-broken install -y")
print("```")
print()
print(f"*Last updated: {datetime.now().strftime('%Y-%m-%d %H:%M UTC')}*")
else:
print("No packages found in artifacts.")
print()
print("Check the [Actions tab](https://github.com/$GITHUB_REPOSITORY/actions) for build status.")
EOF
# Save to file
python3 << 'EOF' > /tmp/download_section.md
import os
import re
from datetime import datetime
# Get artifact files
artifact_dir = "/tmp/artifacts"
files = []
if os.path.exists(artifact_dir):
for file in os.listdir(artifact_dir):
if file.endswith('.deb'):
files.append(file)
# Generate download links
base_url = f"https://github.com/{os.environ['GITHUB_REPOSITORY']}/actions/runs/{os.environ['GITHUB_RUN_ID']}/artifacts"
print("## 📦 Latest Packages")
print()
print("> **Note**: These packages are automatically built by CI/CD. For the latest version, check the [Actions tab](https://github.com/$GITHUB_REPOSITORY/actions).")
print()
if files:
print("### Download Links")
print()
print("| Package | Download |")
print("|---------|----------|")
for file in sorted(files):
if 'libostree' in file:
package_name = "libostree Backport"
elif 'bootc' in file:
package_name = "bootc"
else:
package_name = file
print(f"| {package_name} | [{file}]({base_url}) |")
print()
print("### Installation Instructions")
print()
print("```bash")
print("# Download and install libostree backport first")
print("wget <libostree-package-url>")
print("sudo dpkg -i <libostree-package-name>.deb")
print("sudo apt --fix-broken install -y")
print()
print("# Then install bootc")
print("wget <bootc-package-url>")
print("sudo dpkg -i <bootc-package-name>.deb")
print("sudo apt --fix-broken install -y")
print("```")
print()
print(f"*Last updated: {datetime.now().strftime('%Y-%m-%d %H:%M UTC')}*")
else:
print("No packages found in artifacts.")
print()
print("Check the [Actions tab](https://github.com/$GITHUB_REPOSITORY/actions) for build status.")
EOF
if [ -d "/tmp/artifacts" ] && [ "$(ls -A /tmp/artifacts)" ]; then
echo "### Download Links" >> /tmp/download_section.md
echo "" >> /tmp/download_section.md
echo "| Package | Download |" >> /tmp/download_section.md
echo "|---------|----------|" >> /tmp/download_section.md
for file in /tmp/artifacts/*.deb; do
if [ -f "$file" ]; then
filename=$(basename "$file")
if [[ "$filename" == *"libostree"* ]]; then
package_name="libostree Backport"
elif [[ "$filename" == *"bootc"* ]]; then
package_name="bootc"
else
package_name="$filename"
fi
echo "| $package_name | $filename |" >> /tmp/download_section.md
fi
done
echo "" >> /tmp/download_section.md
echo "### Installation Instructions" >> /tmp/download_section.md
echo "" >> /tmp/download_section.md
echo '```bash' >> /tmp/download_section.md
echo "# Download and install libostree backport first" >> /tmp/download_section.md
echo "sudo dpkg -i <libostree-package-name>.deb" >> /tmp/download_section.md
echo "sudo apt --fix-broken install -y" >> /tmp/download_section.md
echo "" >> /tmp/download_section.md
echo "# Then install bootc" >> /tmp/download_section.md
echo "sudo dpkg -i <bootc-package-name>.deb" >> /tmp/download_section.md
echo "sudo apt --fix-broken install -y" >> /tmp/download_section.md
echo '```' >> /tmp/download_section.md
echo "" >> /tmp/download_section.md
echo "*Last updated: $(date -u '+%Y-%m-%d %H:%M UTC')*" >> /tmp/download_section.md
else
echo "No packages found in artifacts." >> /tmp/download_section.md
echo "" >> /tmp/download_section.md
echo "Check the Actions tab for build status." >> /tmp/download_section.md
fi
- name: Update README
run: |