diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 8a8c7a5..22f9329 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -14,10 +14,18 @@ env: jobs: build: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Checkout code - uses: actions/checkout@v4 + run: | + echo "Cloning repository..." + git clone https://git.raines.xyz/particle-os/bootupd-sdboot.git /tmp/bootupd-sdboot + cd /tmp/bootupd-sdboot + git fetch --all + git checkout ${{ github.sha || gitea.sha || 'main' }} - name: Setup apt-cacher-ng run: | @@ -54,11 +62,13 @@ jobs: - name: Build Docker image run: | + cd /tmp/bootupd-sdboot docker build --build-arg release-name=unstable -f Dockerfile \ -t bootupd-sdboot:latest . - name: Build bootupd inside container run: | + cd /tmp/bootupd-sdboot docker run --rm -v $(pwd):/workspace bootupd-sdboot:latest bash -c " # Setup apt-cacher-ng inside container if available if timeout 5 curl -s --connect-timeout 3 \ @@ -89,6 +99,7 @@ jobs: - name: Create Debian packaging structure run: | + cd /tmp/bootupd-sdboot echo "Creating Debian packaging structure..." # Create debian directory structure @@ -170,6 +181,7 @@ jobs: - name: Create Debian package run: | + cd /tmp/bootupd-sdboot echo "Creating Debian package for bootupd..." # Get build information @@ -210,6 +222,7 @@ jobs: - name: Upload to Forgejo Debian Registry run: | + cd /tmp/bootupd-sdboot echo "Uploading to Forgejo Debian Registry..." # Set Forgejo configuration @@ -286,10 +299,10 @@ jobs: echo "🔧 To install: apt install bootupd" - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: bootupd-binaries - path: | - bootupd - bootupctl - bootupd_*.deb + run: | + cd /tmp/bootupd-sdboot + echo "Creating artifact directory..." + mkdir -p /tmp/artifacts + cp bootupd bootupctl bootupd_*.deb /tmp/artifacts/ 2>/dev/null || true + echo "Artifacts created in /tmp/artifacts/" + ls -la /tmp/artifacts/