feat: add action outputs (#47)
* Create and document action outputs * Use outputs in upload artifact step
This commit is contained in:
parent
ec1f755ae3
commit
e2fbaa438c
|
@ -44,6 +44,7 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build ISO
|
- name: Build ISO
|
||||||
|
id: build-iso
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
ARCH: 'x86_64'
|
ARCH: 'x86_64'
|
||||||
|
@ -60,7 +61,9 @@ jobs:
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: base-main-${{ matrix.version }}${{ matrix.SECURE_BOOT_STRING }}.iso
|
name: base-main-${{ matrix.version }}${{ matrix.SECURE_BOOT_STRING }}.iso
|
||||||
path: end_iso/*
|
path: |
|
||||||
|
${{ steps.build-iso.outputs.iso-path }}
|
||||||
|
${{ steps.build-iso.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
|
||||||
|
|
13
README.md
13
README.md
|
@ -35,6 +35,9 @@ sudo podman run --rm --privileged --volume .:/isogenerator/output -e VERSION=39
|
||||||
```
|
```
|
||||||
|
|
||||||
## Customizing
|
## Customizing
|
||||||
|
|
||||||
|
### Inputs
|
||||||
|
|
||||||
The following variables can be used to customize the create image.
|
The following variables can be used to customize the create image.
|
||||||
|
|
||||||
| Variable | Description | Default Value |
|
| Variable | Description | Default Value |
|
||||||
|
@ -56,6 +59,16 @@ The following variables can be used to customize the create image.
|
||||||
|
|
||||||
Our public key for our kmods is located here: https://github.com/ublue-os/akmods/raw/main/certs/public_key.der
|
Our public key for our kmods is located here: https://github.com/ublue-os/akmods/raw/main/certs/public_key.der
|
||||||
|
|
||||||
|
### Outputs
|
||||||
|
|
||||||
|
This action outputs some useful values for you to use further on in your workflow.
|
||||||
|
|
||||||
|
| Output | Description |
|
||||||
|
| ------ | ----------- |
|
||||||
|
| output-directory | The directory containing ISO and checksum files |
|
||||||
|
| iso-path | The full path to the ISO file |
|
||||||
|
| checksum-path | The full path to the checksum file |
|
||||||
|
|
||||||
## VSCode Dev Container
|
## VSCode Dev Container
|
||||||
There is a dev container configuration provided for development. By default it will use the existing container image available at `ghcr.io/ublue-os/isogenerator`, however, you can have it build a new image by editing `.devcontainer/devcontainer.json` and replacing `image` with `build`. `Ctrl+/` can be used to comment and uncomment blocks of code within VSCode.
|
There is a dev container configuration provided for development. By default it will use the existing container image available at `ghcr.io/ublue-os/isogenerator`, however, you can have it build a new image by editing `.devcontainer/devcontainer.json` and replacing `image` with `build`. `Ctrl+/` can be used to comment and uncomment blocks of code within VSCode.
|
||||||
|
|
||||||
|
|
13
action.yml
13
action.yml
|
@ -48,6 +48,14 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
default: ${{ github.ref }}
|
default: ${{ github.ref }}
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
output-directory:
|
||||||
|
value: ${{ steps.final.outputs.OUTPUT_DIR }}
|
||||||
|
iso-path:
|
||||||
|
value: ${{ steps.final.outputs.ISO_PATH }}
|
||||||
|
checksum-path:
|
||||||
|
value: ${{ steps.final.outputs.CHECKSUM_PATH }}
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
|
@ -120,6 +128,7 @@ runs:
|
||||||
|
|
||||||
- name: Create deploy.iso and generate sha256 checksum
|
- name: Create deploy.iso and generate sha256 checksum
|
||||||
shell: bash
|
shell: bash
|
||||||
|
id: final
|
||||||
run: |
|
run: |
|
||||||
make ${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}.iso \
|
make ${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}.iso \
|
||||||
ARCH=${{ inputs.ARCH }} \
|
ARCH=${{ inputs.ARCH }} \
|
||||||
|
@ -132,3 +141,7 @@ runs:
|
||||||
mkdir end_iso
|
mkdir end_iso
|
||||||
sha256sum ${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}.iso > ./end_iso/${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}-CHECKSUM
|
sha256sum ${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}.iso > ./end_iso/${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}-CHECKSUM
|
||||||
mv ${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}.iso end_iso/
|
mv ${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}.iso end_iso/
|
||||||
|
|
||||||
|
echo "OUTPUT_DIR=$(realpath ./end_iso)" >> $GITHUB_OUTPUT
|
||||||
|
echo "ISO_PATH=$(realpath ./end_iso/${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}.iso)" >> $GITHUB_OUTPUT
|
||||||
|
echo "CHECKSUM_PATH=$(realpath ./end_iso/${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}-CHECKSUM)" >> $GITHUB_OUTPUT
|
||||||
|
|
Loading…
Reference in New Issue