diff --git a/.gitea/workflows/base-build.yml b/.gitea/workflows/base-build.yml index c332f68..da9d7fc 100644 --- a/.gitea/workflows/base-build.yml +++ b/.gitea/workflows/base-build.yml @@ -144,34 +144,26 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Create output directory - run: mkdir -p ${{ env.OUTPUT_DIR }} - - - name: Build rootfs Docker image + - name: Build rootfs image run: | - VERSION=${{ matrix.version }} docker build \ - --build-arg VERSION="$VERSION" \ - -t rootfs-$VERSION . + --build-arg VERSION=${{ matrix.version }} \ + -t rootfs-${{ matrix.version }} . - name: Run rootfs bootstrap run: | VERSION=${{ matrix.version }} mkdir -p output - docker run --rm --privileged \ -v "$(pwd)/output:/output" \ rootfs-$VERSION \ bash -c "/scripts/bootstrap-rootfs.sh $VERSION" - TAR="output/debian-$VERSION.tar.bz2" - if [[ ! -f "$TAR" ]]; then - echo "[ERROR] Rootfs tarball missing: $TAR" - ls -lh output + if [[ ! -f "output/debian-$VERSION.tar.bz2" ]]; then + echo "[ERROR] output/debian-$VERSION.tar.bz2 missing" + ls -lh output || true exit 1 - else - echo "[OK] Created $TAR" fi - name: Clone upload repo @@ -184,16 +176,14 @@ jobs: VERSION=${{ matrix.version }} mkdir -p upload/$VERSION - cp "${{ env.OUTPUT_DIR }}/debian-$VERSION.tar.bz2" upload/$VERSION/ + cp "output/debian-$VERSION.tar.bz2" "upload/$VERSION/" cd upload sed -i "/debian-$VERSION.tar.bz2/d" sha256sums.txt 2>/dev/null || true sha256sum "$VERSION/debian-$VERSION.tar.bz2" >> sha256sums.txt - - name: Commit if changed + - name: Commit and push if changed run: | - VERSION=${{ matrix.version }} - cd upload git config user.name "$GIT_USERNAME" git config user.email "$GIT_EMAIL"