This commit is contained in:
plasmagoat 2025-06-09 20:54:02 +02:00
parent f465a729c2
commit 22facca98c

View file

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