diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index ff52ab7..db421cd 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -25,8 +25,8 @@ jobs: # LATEST_TEMPLATE_VMID: 9000 # Removed from direct env for explicit passing to Ansible outputs: image-name: ${{ steps.build_image.outputs.image_name_from_build }} - flake-metadata: ${{ steps.meta.outputs.metadata}} - artifacts-url: ${{ steps.artifact.outputs.artifact-url}} + flake-metadata: ${{ steps.meta.outputs.metadata }} + image-url: ${{ steps.image-artifact.outputs.artifact-url }} steps: # Use nix-env for setup (as you prefer and it works well for ephemeral environments) - name: Install dependencies via nix-env @@ -110,13 +110,6 @@ jobs: proxmox_user={{ env.PROXMOX_USER }} remote_image_path_ci={{ steps.build_image.outputs.image_path_from_build }} - - name: Extract image filename - id: image - run: | - IMAGE=$(basename ${{ steps.build_image.outputs.image_path_from_build }}/*.vma.zst) - echo "Image filename: $IMAGE" - echo "filename=$IMAGE" >> "$GITHUB_OUTPUT" - - name: Extract flake metadata id: meta run: | @@ -130,13 +123,23 @@ jobs: echo "metadata=$META" >> "$GITHUB_OUTPUT" - - name: Upload Artifact - id: artifact - uses: actions/upload-artifact@v3 + - name: Upload Release Artifact + id: release-artifact + uses: forgejo/upload-artifact@v4 + if: ${{ steps.build_image.outputs.image_path_from_build }} + with: + name: release-artifact + path: | + . + !**/*.vma.zst + + - name: Upload Image Artifact + id: image-artifact + uses: forgejo/upload-artifact@v4 if: ${{ steps.build_image.outputs.image_path_from_build }} with: name: build-artifact - path: . + path: ${{ steps.build_image.outputs.image_path_from_build }} release: name: Release Image @@ -144,6 +147,12 @@ jobs: runs-on: ubuntu-latest if: success() steps: + - name: Download Release Artifact + id: release-artifact + uses: forgejo/download-artifact@v4 + with: + name: release-artifact + - name: Set version id: version run: | @@ -172,7 +181,7 @@ jobs: **🔗 Build Results:** [View Build Logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}) - [Download Build Artifact](${{ needs.build.outputs.artifacts-url }}) + [Download Build Artifact](${{ needs.build.outputs.image-url }}) **🔐 Flake Revision:** `${{ github.sha }}` @@ -180,4 +189,4 @@ jobs: **📦 Flake Inputs:** ${{ needs.build.outputs.flake-metadata }} - release-dir: "." + release-dir: "${{ steps.release-artifact.outputs.download-path }}"