mirror of
https://github.com/SeedSigner/seedsigner.git
synced 2026-10-05 15:08:25 +00:00
Merge pull request #956 from newtonick/fix-build-yml-versioning
[CI] Fix for build.yml and writing `version.json`
This commit is contained in:
@@ -83,15 +83,9 @@ jobs:
|
|||||||
echo "img_version=os${os_version}_sw${source_version}"| tee -a $GITHUB_ENV
|
echo "img_version=os${os_version}_sw${source_version}"| tee -a $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: delete unnecessary files
|
# NOTE: trimming the overlay down to src/ is deliberately left to seedsigner-os
|
||||||
# The seedsigner-os buildroot overlay only needs src/; drop everything
|
# build.sh (delete_unnecessary_files). It needs the .git/ and tools/ we would
|
||||||
# else from the seedsigner checkout (tests, docs, tooling, .git, etc.)
|
# otherwise delete here in order to write version.json first.
|
||||||
# to keep the overlay minimal.
|
|
||||||
run: |
|
|
||||||
cd seedsigner-os/opt/rootfs-overlay/opt
|
|
||||||
find . -mindepth 1 -maxdepth 1 ! -name src -exec rm -rf {} +
|
|
||||||
ls -la .
|
|
||||||
ls -la src
|
|
||||||
|
|
||||||
- name: restore build cache
|
- name: restore build cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
@@ -125,6 +119,15 @@ jobs:
|
|||||||
--${{ matrix.target }} --skip-repo --no-clean
|
--${{ matrix.target }} --skip-repo --no-clean
|
||||||
sudo chown -R $USER:$USER seedsigner-os/images seedsigner-os/buildroot_dl ~/.buildroot-ccache/
|
sudo chown -R $USER:$USER seedsigner-os/images seedsigner-os/buildroot_dl ~/.buildroot-ccache/
|
||||||
|
|
||||||
|
# version.json is written by seedsigner-os build.sh. If it is missing or has a
|
||||||
|
# null field the app raises at the splash screen, which looks like an
|
||||||
|
# unrecoverable boot hang, so fail the build rather than publish the image.
|
||||||
|
- name: verify version.json
|
||||||
|
working-directory: seedsigner-os/opt/rootfs-overlay/opt
|
||||||
|
run: |
|
||||||
|
cat src/seedsigner/version.json
|
||||||
|
jq -e '.name and .fork and .short_commit_hash and .timestamp' src/seedsigner/version.json
|
||||||
|
|
||||||
- name: list image (before rename)
|
- name: list image (before rename)
|
||||||
run: |
|
run: |
|
||||||
ls -la seedsigner-os/images
|
ls -la seedsigner-os/images
|
||||||
|
|||||||
Reference in New Issue
Block a user