From 4fbbdb47f0821433682daa30ecb2b825453af72d Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 31 Oct 2023 16:53:44 +0100 Subject: [PATCH 1/2] feat: Passthrough multiple devices --- run/disk.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/run/disk.sh b/run/disk.sh index cecf1959..92b04f5c 100644 --- a/run/disk.sh +++ b/run/disk.sh @@ -178,6 +178,8 @@ else fi : ${DEVICE:=''} # Docker variable to passthrough a block device, like /dev/vdc1. +: ${DEVICE2:=''} +: ${DEVICE3:=''} if [ -n "${DEVICE}" ]; then @@ -189,3 +191,25 @@ if [ -n "${DEVICE}" ]; then -device scsi-hd,bus=hw-userdata4.0,channel=0,scsi-id=0,lun=0,drive=drive-userdata4,id=userdata4,rotation_rate=${DISK_ROTATION},bootindex=6" fi + +if [ -n "${DEVICE2}" ]; then + + [ ! -b "${DEVICE2}" ] && error "Device ${DEVICE2} cannot be found! Please add it to the 'devices' section of your compose file." && exit 56 + + DISK_OPTS="${DISK_OPTS} \ + -device virtio-scsi-pci,id=hw-userdata5,bus=pcie.0,addr=0x5 \ + -drive file=${DEVICE2},if=none,id=drive-userdata5,format=raw,cache=${DISK_CACHE},aio=${DISK_IO},discard=${DISK_DISCARD},detect-zeroes=on \ + -device scsi-hd,bus=hw-userdata5.0,channel=0,scsi-id=0,lun=0,drive=drive-userdata5,id=userdata5,rotation_rate=${DISK_ROTATION},bootindex=7" + +fi + +if [ -n "${DEVICE3}" ]; then + + [ ! -b "${DEVICE3}" ] && error "Device ${DEVICE3} cannot be found! Please add it to the 'devices' section of your compose file." && exit 57 + + DISK_OPTS="${DISK_OPTS} \ + -device virtio-scsi-pci,id=hw-userdata6,bus=pcie.0,addr=0x6 \ + -drive file=${DEVICE3},if=none,id=drive-userdata6,format=raw,cache=${DISK_CACHE},aio=${DISK_IO},discard=${DISK_DISCARD},detect-zeroes=on \ + -device scsi-hd,bus=hw-userdata6.0,channel=0,scsi-id=0,lun=0,drive=drive-userdata6,id=userdata6,rotation_rate=${DISK_ROTATION},bootindex=8" + +fi From ab08524a71ea811769485e191306de3ed7619f21 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 31 Oct 2023 16:57:43 +0100 Subject: [PATCH 2/2] build: Changelog --- .github/workflows/build.yml | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5eff6594..1b947297 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,8 +44,8 @@ jobs: TAGS=() TAGS=("${{ github.repository }}:latest") TAGS+=("${{ github.repository }}:${VERSION}") - TAGS+=("${{ secrets.DOCKERHUB_MIRROR }}:latest") - TAGS+=("${{ secrets.DOCKERHUB_MIRROR }}:${VERSION}") + #TAGS+=("${{ secrets.DOCKERHUB_MIRROR }}:latest") + #TAGS+=("${{ secrets.DOCKERHUB_MIRROR }}:${VERSION}") TAGS+=("ghcr.io/${{ github.repository }}:latest") TAGS+=("ghcr.io/${{ github.repository }}:${VERSION}") @@ -88,25 +88,6 @@ jobs: name: Clear Docker credentials run: | rm -f ${HOME}/.docker/config.json - - - name: Get previous tag - id: previousTag - run: | - name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -1) - echo "previousTag: $name" - echo "previousTag=$name" >> $GITHUB_ENV - - - name: Generate changelog - id: changelog - uses: requarks/changelog-action@v1 - with: - token: ${{ github.token }} - fromTag: ${{ github.ref_name }} - toTag: ${{ env.previousTag }} - writeToFile: false - reverseOrder: true - includeInvalidCommits: true - excludeTypes: "docs,build,chore" - name: Create a release uses: action-pack/github-release@v2 @@ -115,10 +96,6 @@ jobs: with: tag: "v${{ steps.prepare.outputs.version }}" title: "v${{ steps.prepare.outputs.version }}" - body: | - ${{ steps.changelog.outputs.changes }} - - **Full Changelog**: https://github.com/${{ github.repository }}/compare//${{ env.previousTag }}...v${{ steps.prepare.outputs.version }} - name: Increment version variable uses: action-pack/bump@v2