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
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:
parent
695714a60e
commit
4a9c19ef1c
3 changed files with 46 additions and 179 deletions
|
|
@ -5,8 +5,6 @@ on:
|
||||||
branches: [ main, master ]
|
branches: [ main, master ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main, master ]
|
branches: [ main, master ]
|
||||||
release:
|
|
||||||
types: [ published ]
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
UBUNTU_VERSION: "24.04"
|
UBUNTU_VERSION: "24.04"
|
||||||
|
|
@ -123,35 +121,10 @@ jobs:
|
||||||
path: bootc-${BOOTC_VERSION}/../*.deb
|
path: bootc-${BOOTC_VERSION}/../*.deb
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
create-release:
|
create-artifacts:
|
||||||
name: Create Release
|
name: Create Combined Artifacts
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
needs: [build-libostree-backport, build-bootc]
|
needs: [build-libostree-backport, build-bootc]
|
||||||
if: github.event_name == 'release'
|
|
||||||
steps:
|
|
||||||
- name: Download all artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
path: /tmp/artifacts
|
|
||||||
|
|
||||||
- name: Create release assets
|
|
||||||
run: |
|
|
||||||
mkdir -p release-assets
|
|
||||||
cp /tmp/artifacts/libostree-backport-packages/*.deb release-assets/
|
|
||||||
cp /tmp/artifacts/bootc-packages/*.deb release-assets/
|
|
||||||
|
|
||||||
- name: Upload release assets
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: release-assets
|
|
||||||
path: release-assets/
|
|
||||||
retention-days: 90
|
|
||||||
|
|
||||||
create-artifacts-for-readme:
|
|
||||||
name: Create Artifacts for README Update
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
needs: [build-libostree-backport, build-bootc]
|
|
||||||
if: github.event_name != 'release'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
# Forgejo Actions Configuration
|
|
||||||
# This file configures the CI/CD environment for building bootc and libostree packages
|
|
||||||
|
|
||||||
# Enable Actions
|
|
||||||
actions:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
# Default runner settings
|
|
||||||
runners:
|
|
||||||
# Use Ubuntu 24.04 for all builds
|
|
||||||
ubuntu-24.04:
|
|
||||||
image: ubuntu:24.04
|
|
||||||
# Enable sudo for package installation
|
|
||||||
privileged: true
|
|
||||||
|
|
||||||
# Workflow settings
|
|
||||||
workflows:
|
|
||||||
# Allow manual workflow triggers
|
|
||||||
manual_trigger: true
|
|
||||||
|
|
||||||
# Enable workflow reuse
|
|
||||||
reusable_workflows: true
|
|
||||||
|
|
||||||
# Artifact retention settings
|
|
||||||
artifacts:
|
|
||||||
retention_days: 30
|
|
||||||
max_size_mb: 1000
|
|
||||||
|
|
@ -23,131 +23,52 @@ jobs:
|
||||||
name: release-assets
|
name: release-assets
|
||||||
path: /tmp/artifacts
|
path: /tmp/artifacts
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Generate download section
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
|
|
||||||
- name: Generate download links
|
|
||||||
run: |
|
run: |
|
||||||
python3 << 'EOF'
|
echo "## 📦 Latest Packages" > /tmp/download_section.md
|
||||||
import os
|
echo "" >> /tmp/download_section.md
|
||||||
import re
|
echo "> **Note**: These packages are automatically built by CI/CD." >> /tmp/download_section.md
|
||||||
from datetime import datetime
|
echo "" >> /tmp/download_section.md
|
||||||
|
|
||||||
# Get artifact files
|
if [ -d "/tmp/artifacts" ] && [ "$(ls -A /tmp/artifacts)" ]; then
|
||||||
artifact_dir = "/tmp/artifacts"
|
echo "### Download Links" >> /tmp/download_section.md
|
||||||
files = []
|
echo "" >> /tmp/download_section.md
|
||||||
if os.path.exists(artifact_dir):
|
echo "| Package | Download |" >> /tmp/download_section.md
|
||||||
for file in os.listdir(artifact_dir):
|
echo "|---------|----------|" >> /tmp/download_section.md
|
||||||
if file.endswith('.deb'):
|
|
||||||
files.append(file)
|
for file in /tmp/artifacts/*.deb; do
|
||||||
|
if [ -f "$file" ]; then
|
||||||
# Generate download links
|
filename=$(basename "$file")
|
||||||
base_url = f"https://github.com/{os.environ['GITHUB_REPOSITORY']}/actions/runs/{os.environ['GITHUB_RUN_ID']}/artifacts"
|
if [[ "$filename" == *"libostree"* ]]; then
|
||||||
|
package_name="libostree Backport"
|
||||||
print("## 📦 Latest Packages")
|
elif [[ "$filename" == *"bootc"* ]]; then
|
||||||
print()
|
package_name="bootc"
|
||||||
print("> **Note**: These packages are automatically built by CI/CD. For the latest version, check the [Actions tab](https://github.com/$GITHUB_REPOSITORY/actions).")
|
else
|
||||||
print()
|
package_name="$filename"
|
||||||
|
fi
|
||||||
if files:
|
echo "| $package_name | $filename |" >> /tmp/download_section.md
|
||||||
print("### Download Links")
|
fi
|
||||||
print()
|
done
|
||||||
print("| Package | Download |")
|
|
||||||
print("|---------|----------|")
|
echo "" >> /tmp/download_section.md
|
||||||
|
echo "### Installation Instructions" >> /tmp/download_section.md
|
||||||
for file in sorted(files):
|
echo "" >> /tmp/download_section.md
|
||||||
if 'libostree' in file:
|
echo '```bash' >> /tmp/download_section.md
|
||||||
package_name = "libostree Backport"
|
echo "# Download and install libostree backport first" >> /tmp/download_section.md
|
||||||
elif 'bootc' in file:
|
echo "sudo dpkg -i <libostree-package-name>.deb" >> /tmp/download_section.md
|
||||||
package_name = "bootc"
|
echo "sudo apt --fix-broken install -y" >> /tmp/download_section.md
|
||||||
else:
|
echo "" >> /tmp/download_section.md
|
||||||
package_name = file
|
echo "# Then install bootc" >> /tmp/download_section.md
|
||||||
|
echo "sudo dpkg -i <bootc-package-name>.deb" >> /tmp/download_section.md
|
||||||
print(f"| {package_name} | [{file}]({base_url}) |")
|
echo "sudo apt --fix-broken install -y" >> /tmp/download_section.md
|
||||||
|
echo '```' >> /tmp/download_section.md
|
||||||
print()
|
echo "" >> /tmp/download_section.md
|
||||||
print("### Installation Instructions")
|
echo "*Last updated: $(date -u '+%Y-%m-%d %H:%M UTC')*" >> /tmp/download_section.md
|
||||||
print()
|
else
|
||||||
print("```bash")
|
echo "No packages found in artifacts." >> /tmp/download_section.md
|
||||||
print("# Download and install libostree backport first")
|
echo "" >> /tmp/download_section.md
|
||||||
print("wget <libostree-package-url>")
|
echo "Check the Actions tab for build status." >> /tmp/download_section.md
|
||||||
print("sudo dpkg -i <libostree-package-name>.deb")
|
fi
|
||||||
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
|
|
||||||
|
|
||||||
- name: Update README
|
- name: Update README
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue