image filename
This commit is contained in:
parent
108d9686cb
commit
7c81609c2a
1 changed files with 5 additions and 29 deletions
|
|
@ -60,6 +60,7 @@ jobs:
|
||||||
cachix authtoken ${{ secrets.CACHIX_AUTH_TOKEN }}
|
cachix authtoken ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||||
|
|
||||||
- name: Build NixOS image
|
- name: Build NixOS image
|
||||||
|
id: build
|
||||||
run: |
|
run: |
|
||||||
nix build .#base \
|
nix build .#base \
|
||||||
--no-link --print-out-paths \
|
--no-link --print-out-paths \
|
||||||
|
|
@ -68,34 +69,7 @@ jobs:
|
||||||
--no-link --print-out-paths \
|
--no-link --print-out-paths \
|
||||||
| cachix push plasmagoat
|
| cachix push plasmagoat
|
||||||
|
|
||||||
# - name: Upload image to Proxmox and manage templates
|
echo "image=$(ls result/*.vma.zst | head -n 1)" >> $GITHUB_OUTPUT
|
||||||
# run: |
|
|
||||||
# set -e
|
|
||||||
# IMAGE="result/*.vma.zst"
|
|
||||||
# REMOTE_NAME="nixos-base-image-${{ steps.version.outputs.tag}}.vma.zst"
|
|
||||||
# REMOTE_PATH="/var/lib/vz/template/images/$REMOTE_NAME"
|
|
||||||
|
|
||||||
# echo "Uploading $IMAGE to Proxmox as $REMOTE_NAME"
|
|
||||||
# scp $IMAGE $PROXMOX_USER@$PROXMOX_HOST:$REMOTE_PATH
|
|
||||||
|
|
||||||
# echo "Restoring as VMID $TEMPLATE_VMID"
|
|
||||||
# ssh $PROXMOX_USER@$PROXMOX_HOST "
|
|
||||||
# qm destroy $TEMPLATE_VMID --purge || true
|
|
||||||
# qmrestore $REMOTE_PATH $TEMPLATE_VMID --unique
|
|
||||||
# qm template $TEMPLATE_VMID
|
|
||||||
|
|
||||||
# echo 'Cloning to $LATEST_TEMPLATE_VMID as latest'
|
|
||||||
# qm destroy $LATEST_TEMPLATE_VMID --purge || true
|
|
||||||
# qm clone $TEMPLATE_VMID $LATEST_TEMPLATE_VMID --name nixos-base-latest
|
|
||||||
# qm template $TEMPLATE_VMID
|
|
||||||
# "
|
|
||||||
|
|
||||||
# - name: Prune old templates
|
|
||||||
# run: |
|
|
||||||
# ssh $PROXMOX_USER@$PROXMOX_HOST "
|
|
||||||
# cd /var/lib/vz/template/images
|
|
||||||
# ls -tp nixos-base-image-*.vma.zst | grep -v '/$' | tail -n +6 | xargs -r rm --
|
|
||||||
# "
|
|
||||||
|
|
||||||
- name: Create Forgejo Release
|
- name: Create Forgejo Release
|
||||||
uses: https://code.forgejo.org/actions/forgejo-release@v2.6.0
|
uses: https://code.forgejo.org/actions/forgejo-release@v2.6.0
|
||||||
|
|
@ -106,4 +80,6 @@ jobs:
|
||||||
direction: upload
|
direction: upload
|
||||||
release-notes: |
|
release-notes: |
|
||||||
This release contains the NixOS base image for Proxmox labeled `${{ steps.version.outputs.tag }}`.
|
This release contains the NixOS base image for Proxmox labeled `${{ steps.version.outputs.tag }}`.
|
||||||
release-dir: results
|
|
||||||
|
Image filename: ${{ steps.version.outputs.tag }}
|
||||||
|
release-dir: ./results
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue