Skip to content

Commit

Permalink
Make build mount path and add ownership input
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidd6 authored and easimon committed Aug 13, 2023
1 parent f869433 commit 588fa33
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ inputs:
build-mount-path:
description: 'Absolute path to the mount point where the build space will be available, defaults to $GITHUB_WORKSPACE if unset.'
required: false
build-mount-path-ownership:
description: 'Ownership of the mount point path, defaults to standard "runner" user and group.'
required: false
default: 'runner:runner'
pv-loop-path:
description: 'Absolute file path for the LVM image created on the root filesystem, the default is usually fine.'
required: false
Expand Down Expand Up @@ -171,9 +175,11 @@ runs:
else
sudo mkfs.ext4 -Enodiscard -m0 "/dev/mapper/${VG_NAME}-buildlv"
fi
if [[ ! -d "${BUILD_MOUNT_PATH}" ]]; then
mkdir -p "${BUILD_MOUNT_PATH}"
fi
sudo mount "/dev/mapper/${VG_NAME}-buildlv" "${BUILD_MOUNT_PATH}"
sudo chown -R runner "${BUILD_MOUNT_PATH}"
sudo chgrp -R runner "${BUILD_MOUNT_PATH}"
sudo chown -R "${{ inputs.build-mount-path-ownership }}" "${BUILD_MOUNT_PATH}"
- name: Disk space report after modification
shell: bash
Expand Down

0 comments on commit 588fa33

Please sign in to comment.