mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
fix rename
This commit is contained in:
parent
e8f1fd3c04
commit
ac1abc0fb5
1 changed files with 22 additions and 15 deletions
37
action.yml
37
action.yml
|
|
@ -30,8 +30,9 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
iso_name:
|
iso_name:
|
||||||
description: Used for specifying the name of the output iso
|
description: Name of the resulting ISO. Relative paths are relative to ${{ github.workspace }}
|
||||||
required: false
|
required: false
|
||||||
|
default: build/deploy.iso
|
||||||
enrollment_password:
|
enrollment_password:
|
||||||
description: Used for supporting secure boot (requires SECURE_BOOT_KEY_URL to be defined)
|
description: Used for supporting secure boot (requires SECURE_BOOT_KEY_URL to be defined)
|
||||||
required: false
|
required: false
|
||||||
|
|
@ -48,15 +49,9 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
output-directory:
|
iso_name:
|
||||||
value: ${{ steps.rename_iso.outputs.OUTPUT_DIRECTORY }}
|
value: ${{ steps.rename_iso.outputs.ISO }}
|
||||||
description: The location of all output objects
|
|
||||||
iso-path:
|
|
||||||
value: ${{ steps.rename_iso.outputs.ISO_PATH }}
|
|
||||||
description: The location of the .iso object
|
description: The location of the .iso object
|
||||||
checksum-path:
|
|
||||||
value: ${{ steps.rename_iso.outputs.CHECKSUM_PATH }}
|
|
||||||
description: The location of the checksum
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
|
|
@ -79,13 +74,25 @@ runs:
|
||||||
ENROLLMENT_PASSWORD=${{ inputs.enrollment_password }} \
|
ENROLLMENT_PASSWORD=${{ inputs.enrollment_password }} \
|
||||||
SECURE_BOOT_KEY_URL=${{ inputs.secure_boot_key_url }} \
|
SECURE_BOOT_KEY_URL=${{ inputs.secure_boot_key_url }} \
|
||||||
"ADDITIONAL_TEMPLATES=${{ inputs.additional_templates }}"
|
"ADDITIONAL_TEMPLATES=${{ inputs.additional_templates }}"
|
||||||
|
|
||||||
- name: Rename ISO file
|
- name: Rename ISO file
|
||||||
id: rename_iso
|
id: rename_iso
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mv ${{ github.workspace }}/build/deploy.iso ${{ github.workspace }}/build/${{ inputs.iso_name }}.iso
|
if [[ ! ( "${{ inputs.iso_name }}" =~ \.iso$ ) ]]
|
||||||
cd ${{ github.workspace }}/build
|
then
|
||||||
sha256sum ${{ inputs.iso_name }}.iso > ${{ inputs.iso_name }}-CHECKSUM
|
iso_name="${{ inputs.iso_name }}.iso"
|
||||||
echo "OUTPUT_DIRECTORY=$(realpath ${{ github.workspace }}/build)" >> $GITHUB_OUTPUT
|
else
|
||||||
echo "ISO_PATH=$(realpath ${{ github.workspace }}/build/${{ inputs.iso_name }}.iso)" >> $GITHUB_OUTPUT
|
iso_name="${{ inputs.iso_name }}"
|
||||||
echo "CHECKSUM_PATH=$(realpath ${{ github.workspace }}/build/${{ inputs.iso_name }}-CHECKSUM)" >> $GITHUB_OUTPUT
|
fi
|
||||||
|
if [[ "${{ inputs.iso_name }}" =~ ^/ ]]
|
||||||
|
then
|
||||||
|
full_path="${iso_name}"
|
||||||
|
else
|
||||||
|
fullpath="${{ github.workspace }}/${iso_name}"
|
||||||
|
fi
|
||||||
|
mv ${{ github.workspace }}/build/deploy.iso ${fullpath} || true
|
||||||
|
cd $(dirname ${fullpath})
|
||||||
|
iso_fn=$(basename ${iso_name})
|
||||||
|
sha256sum ${iso_fn} > ${iso_fn%.iso}-CHECKSUM
|
||||||
|
echo "ISO=${full_path}" >> $GITHUB_OUTPUT
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue