From 70be95cd83fd7c74eb5cd1fd451a489e79420099 Mon Sep 17 00:00:00 2001 From: Noel Miller Date: Wed, 6 Mar 2024 03:55:38 -0600 Subject: [PATCH] fix: updated action to use outputs and build-and-test to use outputs --- .github/workflows/build-and-test.yml | 5 ++++- action.yml | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index b7a8217..5b96bcc 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -86,6 +86,7 @@ jobs: - name: Build ISO with new container uses: ./ + id: build with: arch: ${{ env.ARCH}} image_name: ${{ env.IMAGE_NAME}} @@ -101,7 +102,9 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.ISO_NAME }}.iso - path: ${{ github.workspace}}/* + path: | + ${{ steps.build.outputs.iso-path }} + ${{ steps.build.outputs.checksum-path }} if-no-files-found: error retention-days: 0 compression-level: 0 diff --git a/action.yml b/action.yml index 1524e26..f9d4a4c 100644 --- a/action.yml +++ b/action.yml @@ -47,10 +47,19 @@ inputs: description: Space delimetered list of additional Lorax templates to include required: false +outputs: + iso-path: + value: ${{ steps.run_docker.outputs.ISO_PATH }} + description: The location of the .iso object + checksum-path: + value: ${{ steps.run_docker.outputs.CHECKSUM_PATH }} + description: The location of the checksum + runs: using: composite steps: - name: Run docker image + id: run_docker shell: bash run: | # Check if running inside of the action repo @@ -68,4 +77,6 @@ runs: ENROLLMENT_PASSWORD=${{ inputs.enrollment_password }} \ SECURE_BOOT_KEY_URL=${{ inputs.secure_boot_key_url }} \ "ADDITIONAL_TEMPLATES=${{ inputs.additional_templates }}" + echo "ISO_PATH=$(realpath ${{ github.workspace }}/${{ inputs.iso_name }}.iso)" >> $GITHUB_OUTPUT + echo "CHECKSUM_PATH=$(realpath ${{ github.workspace }}/${{ inputs.iso_name }}-CHECKSUM)" >> $GITHUB_OUTPUT