From 288976f017d276d14a5c4bb2fabce7da6b01a012 Mon Sep 17 00:00:00 2001 From: Noel Miller Date: Tue, 5 Mar 2024 23:57:11 -0600 Subject: [PATCH] fix: added move to entrypoint --- .github/workflows/build-and-test.yml | 6 +----- Containerfile | 3 +-- action.yml | 7 +------ entrypoint.sh | 2 ++ 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 23df421..d03316b 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -94,16 +94,12 @@ jobs: secure_boot_key_url: ${{ env.SECURE_BOOT_KEY_URL }} enrollment_password: ${{ env.ENROLLMENT_PASSWORD }} - - name: Rename ISO - run: | - mv ${{ env.OUTPUT_DIR }}/deploy.iso ${{ env.OUTPUT_DIR }}/${{ env.IMAGE_NAME }}-${{ env.VERSION }}.iso - - name: Upload ISO as artifact id: upload uses: actions/upload-artifact@v4 with: name: ${{ env.IMAGE_NAME }}-${{ env.VERSION }}.iso - path: ${{ env.OUTPUT_DIR }}/*.iso + path: ${{ github.workspace}}/{{ env.IMAGE_NAME }}-${{ env.VERSION }}.iso if-no-files-found: error retention-days: 0 compression-level: 0 diff --git a/Containerfile b/Containerfile index 6cce8cd..7488139 100644 --- a/Containerfile +++ b/Containerfile @@ -9,7 +9,6 @@ ENV IMAGE_TAG="${VERSION}" ENV VARIANT="Server" ENV VERSION="${VERSION}" ENV WEB_UI="false" -ENV OUTPUT_DIR="/build-container-installer/build" RUN mkdir /build-container-installer @@ -19,7 +18,7 @@ WORKDIR /build-container-installer RUN dnf install -y make && make install-deps -VOLUME ${OUTPUT_DIR} +VOLUME /build-container-installer/build ENTRYPOINT ["/bin/bash", "/build-container-installer/entrypoint.sh"] diff --git a/action.yml b/action.yml index ab25810..27b52b6 100644 --- a/action.yml +++ b/action.yml @@ -36,10 +36,6 @@ inputs: secure_boot_key_url: description: Secure boot key that is installed from URL location required: false - output_dir: - description: Define a specific output directory - required: false - default: "/build-container-installer/build" action_version: description: Version of the action container to run deprecationMessage: No longer used. github.action_ref replaces the need for this. Will be removed in a future version. @@ -57,7 +53,7 @@ runs: # Check if running inside of the action repo if [[ -z "${{ github.action_ref }}" ]]; then if [[ "${{ github.ref_name }}" =~ (.*)/merge ]]; then tag=pr-${BASH_REMATCH[1]}; else tag=${{ github.ref_name }}; fi; fi if [[ -z "${tag}" ]]; then tag=${{ github.action_ref }}; fi - docker run --privileged --volume ${{ github.workspace }}:/github/workspace/ ghcr.io/jasonn3/build-container-installer:${tag} \ + docker run --privileged --volume ${{ github.workspace }}:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:${tag} \ ARCH=${{ inputs.arch }} \ IMAGE_NAME=${{ inputs.image_name }} \ IMAGE_REPO=${{ inputs.image_repo }} \ @@ -67,6 +63,5 @@ runs: WEB_UI=${{ inputs.web_ui }} \ ENROLLMENT_PASSWORD=${{ inputs.enrollment_password }} \ SECURE_BOOT_KEY_URL=${{ inputs.secure_boot_key_url }} \ - OUTPUT_DIR=${{ inputs.output_dir }} \ "ADDITIONAL_TEMPLATES=${{ inputs.additional_templates }}" diff --git a/entrypoint.sh b/entrypoint.sh index d8602a8..2128598 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -14,3 +14,5 @@ make boot.iso $@ # Add container to ISO make build/deploy.iso $@ + +mv build/deploy.iso build/${IMAGE_NAME}-${VERSION}.iso