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:
parent
468c599735
commit
e72ffb5b70
4 changed files with 20 additions and 17 deletions
5
.github/workflows/build-and-test.yml
vendored
5
.github/workflows/build-and-test.yml
vendored
|
|
@ -108,9 +108,7 @@ jobs:
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ env.ISO_NAME }}.iso
|
name: ${{ env.ISO_NAME }}.iso
|
||||||
path: |
|
path: ${{ steps.build.outputs.output-directory }}
|
||||||
${{ steps.build.outputs.iso-path }}
|
|
||||||
${{ steps.build.outputs.checksum-path }}
|
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 0
|
retention-days: 0
|
||||||
compression-level: 0
|
compression-level: 0
|
||||||
|
|
@ -226,4 +224,3 @@ jobs:
|
||||||
./${check}
|
./${check}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
12
README.md
12
README.md
|
|
@ -22,9 +22,7 @@ This action is designed to be called from a GitHub workflow using the following
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: my_iso.iso
|
name: my_iso.iso
|
||||||
path: |
|
path: ${{ steps.build.outputs.output-directory }}
|
||||||
${{ steps.build.outputs.iso_path }}
|
|
||||||
${{ steps.build.outputs.checksum-path }}
|
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 0
|
retention-days: 0
|
||||||
compression-level: 0
|
compression-level: 0
|
||||||
|
|
@ -53,9 +51,10 @@ Variant will be the third item in the package name. Example: `fedora-release-kin
|
||||||
|
|
||||||
### Outputs
|
### Outputs
|
||||||
| Variable | Description | Usage |
|
| Variable | Description | Usage |
|
||||||
| ----------------- | -------------------------------------------------------- | ------------------------------------------------ |
|
| ----------------- | ------------------------------------------------------ | -------------------------------------------------------- |
|
||||||
| iso-path | Path to ISO file that the action creates | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_path }} |
|
| output-directory | Path to all files in the output directory | ${{ steps.YOUR_ID_FOR_ACTION.outputs.output-directory }} |
|
||||||
| checksum-path | Path to the checksum file that the action creates | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_path }} |
|
| 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.
|
For outputs, see example above.
|
||||||
|
|
||||||
|
|
@ -129,4 +128,3 @@ Build a new container image:
|
||||||
"privileged": true
|
"privileged": true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
12
action.yml
12
action.yml
|
|
@ -48,6 +48,9 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
|
output-directory:
|
||||||
|
value: ${{ steps.run_docker.outputs.OUTPUT_DIRECTORY }}
|
||||||
|
description: The location of all output objects
|
||||||
iso-path:
|
iso-path:
|
||||||
value: ${{ steps.run_docker.outputs.ISO_PATH }}
|
value: ${{ steps.run_docker.outputs.ISO_PATH }}
|
||||||
description: The location of the .iso object
|
description: The location of the .iso object
|
||||||
|
|
@ -80,8 +83,9 @@ runs:
|
||||||
- name: Rename ISO file
|
- name: Rename ISO file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mv ${{ github.workspace }}/deploy.iso ${{ github.workspace }}/${{ inputs.iso_name }}.iso
|
mv ${{ github.workspace }}/build/deploy.iso ${{ github.workspace }}/build/${{ inputs.iso_name }}.iso
|
||||||
cd ${{ github.workspace }}
|
cd ${{ github.workspace }}/build
|
||||||
sha256sum ${{ inputs.iso_name }}.iso > ${{ inputs.iso_name }}-CHECKSUM
|
sha256sum ${{ inputs.iso_name }}.iso > ${{ inputs.iso_name }}-CHECKSUM
|
||||||
echo "ISO_PATH=$(realpath ${{ github.workspace }}/${{ inputs.iso_name }}.iso)" >> $GITHUB_OUTPUT
|
echo "OUTPUT_DIRECTORY=$(realpath ${{ github.workspace }}/build/)" >> $GITHUB_OUTPUT
|
||||||
echo "CHECKSUM_PATH=$(realpath ${{ github.workspace }}/${{ inputs.iso_name }}-CHECKSUM)" >> $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
|
||||||
|
|
|
||||||
|
|
@ -16,5 +16,9 @@ make boot.iso $@
|
||||||
# Add container to ISO
|
# Add container to ISO
|
||||||
make build/deploy.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
|
cp build/deploy.iso /github/workspace/build
|
||||||
chmod -R ugo=rwx /github/workspace/build
|
chmod -R ugo=rwx /github/workspace/build
|
||||||
Loading…
Add table
Add a link
Reference in a new issue