diff options
| author | Tranch <tranch.xiao@gmail.com> | 2026-07-23 18:13:22 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-23 18:13:22 +0800 |
| commit | 095c0cf51555f82e38d91fb6b24c421188c6212e (patch) | |
| tree | d00b565d357db9024c873d457368f3a6a60d034a | |
| parent | b2f4fc705c15746c8dad96d02f7a9c8425d56459 (diff) | |
| parent | aeff85580fae9c6d4dc40ab88c3a89599000de22 (diff) | |
| download | AeroCore-OS-095c0cf51555f82e38d91fb6b24c421188c6212e.tar.gz AeroCore-OS-095c0cf51555f82e38d91fb6b24c421188c6212e.zip | |
Merge pull request #6 from AeroCore-IO/testing
test: update build-live-installer.yml to prepare and upload ISO
| -rw-r--r-- | .github/workflows/build-live-installer.yml | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/.github/workflows/build-live-installer.yml b/.github/workflows/build-live-installer.yml index 1f57edd..0965c33 100644 --- a/.github/workflows/build-live-installer.yml +++ b/.github/workflows/build-live-installer.yml @@ -137,24 +137,34 @@ jobs: echo '```' } >> "$GITHUB_STEP_SUMMARY" - - name: Prepare ISO upload files + - name: Move ISO to upload directory + id: upload-directory + shell: bash run: | - iso_path="output/aerocore-os-${ISO_FILE_TAG}-amd64.iso" - upload_dir="output/upload" - mkdir -p "${upload_dir}" - mv "${iso_path}" "${upload_dir}/" - mv "${iso_path}-CHECKSUM" "${upload_dir}/" - - - name: Upload ISO artifact + iso_upload_dir="${{ github.workspace }}/output/upload" + iso_path="${{ github.workspace }}/output/aerocore-os-${ISO_FILE_TAG}-amd64.iso" + iso_name="$(basename "${iso_path}")" + + mkdir -p "${iso_upload_dir}" + mv "${iso_path}" "${iso_upload_dir}/" + ( + cd "${iso_upload_dir}" + sha256sum "${iso_name}" | tee "${iso_name}-CHECKSUM" + ) + echo "iso-upload-dir=${iso_upload_dir}" >> "$GITHUB_OUTPUT" + + - name: Upload ISO checksum to Job Artifacts + if: github.ref_name == 'testing' uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: - name: aerocore-os-live-installer-${{ env.ISO_FILE_TAG }} - path: output/upload + name: aerocore-os-live-installer-${{ env.ISO_FILE_TAG }}-checksum + path: ${{ steps.upload-directory.outputs.iso-upload-dir }}/*-CHECKSUM if-no-files-found: error + retention-days: 1 compression-level: 0 - name: Upload ISO and checksum to R2 - if: github.ref_name == 'testing' || github.ref_name == 'main' + if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main' shell: bash env: RCLONE_CONFIG_R2_TYPE: s3 @@ -163,7 +173,7 @@ jobs: RCLONE_CONFIG_R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} RCLONE_CONFIG_R2_REGION: auto RCLONE_CONFIG_R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }} - SOURCE_DIR: ${{ github.workspace }}/output/upload + SOURCE_DIR: ${{ steps.upload-directory.outputs.iso-upload-dir }} run: | sudo apt-get update sudo apt-get install -y rclone |
