1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

fix: using output-directory and updated documentation

This commit is contained in:
Noel Miller 2024-03-07 12:43:13 -06:00
parent 468c599735
commit e72ffb5b70
4 changed files with 20 additions and 17 deletions

View file

@ -108,9 +108,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ env.ISO_NAME }}.iso
path: |
${{ steps.build.outputs.iso-path }}
${{ steps.build.outputs.checksum-path }}
path: ${{ steps.build.outputs.output-directory }}
if-no-files-found: error
retention-days: 0
compression-level: 0
@ -226,4 +224,3 @@ jobs:
./${check}
fi
done

View file

@ -22,9 +22,7 @@ This action is designed to be called from a GitHub workflow using the following
uses: actions/upload-artifact@v4
with:
name: my_iso.iso
path: |
${{ steps.build.outputs.iso_path }}
${{ steps.build.outputs.checksum-path }}
path: ${{ steps.build.outputs.output-directory }}
if-no-files-found: error
retention-days: 0
compression-level: 0
@ -52,10 +50,11 @@ Available options for VARIANT can be found by running `dnf provides system-relea
Variant will be the third item in the package name. Example: `fedora-release-kinoite-39-34.noarch` will be kinoite
### Outputs
| Variable | Description | Usage |
| ----------------- | -------------------------------------------------------- | ------------------------------------------------ |
| iso-path | Path to ISO file that the action creates | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_path }} |
| checksum-path | Path to the checksum file that the action creates | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_path }} |
| Variable | Description | Usage |
| ----------------- | ------------------------------------------------------ | -------------------------------------------------------- |
| output-directory | Path to all files in the output directory | ${{ steps.YOUR_ID_FOR_ACTION.outputs.output-directory }} |
| iso-path | Path to just the ISO file that the action creates | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso-path }} |
| checksum-path | Path to just the checksum file that the action creates | ${{ steps.YOUR_ID_FOR_ACTION.outputs.checksum-path }} |
For outputs, see example above.
@ -129,4 +128,3 @@ Build a new container image:
"privileged": true
}
```

View file

@ -48,6 +48,9 @@ inputs:
required: false
outputs:
output-directory:
value: ${{ steps.run_docker.outputs.OUTPUT_DIRECTORY }}
description: The location of all output objects
iso-path:
value: ${{ steps.run_docker.outputs.ISO_PATH }}
description: The location of the .iso object
@ -80,8 +83,9 @@ runs:
- name: Rename ISO file
shell: bash
run: |
mv ${{ github.workspace }}/deploy.iso ${{ github.workspace }}/${{ inputs.iso_name }}.iso
cd ${{ github.workspace }}
mv ${{ github.workspace }}/build/deploy.iso ${{ github.workspace }}/build/${{ inputs.iso_name }}.iso
cd ${{ github.workspace }}/build
sha256sum ${{ inputs.iso_name }}.iso > ${{ inputs.iso_name }}-CHECKSUM
echo "ISO_PATH=$(realpath ${{ github.workspace }}/${{ inputs.iso_name }}.iso)" >> $GITHUB_OUTPUT
echo "CHECKSUM_PATH=$(realpath ${{ github.workspace }}/${{ inputs.iso_name }}-CHECKSUM)" >> $GITHUB_OUTPUT
echo "OUTPUT_DIRECTORY=$(realpath ${{ github.workspace }}/build/)" >> $GITHUB_OUTPUT
echo "ISO_PATH=$(realpath ${{ github.workspace }}/build/${{ inputs.iso_name }}.iso)" >> $GITHUB_OUTPUT
echo "CHECKSUM_PATH=$(realpath ${{ github.workspace }}/build/${{ inputs.iso_name }}-CHECKSUM)" >> $GITHUB_OUTPUT

View file

@ -16,5 +16,9 @@ make boot.iso $@
# Add container to ISO
make build/deploy.iso $@
# Make output dir in github workspace
mkdir /github/workspace/build || true
# Copy resulting iso to githubworkspace and fix permissions
cp build/deploy.iso /github/workspace/build
chmod -R ugo=rwx /github/workspace/build