Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename action field persist_dir #25

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
with:
# Not setting release_name to test the default behavior
release_type: 'file'
persist_dir: '/tmp/persist'
artifacts_dir: 'artifacts'
persist_dir_on_device: '/tmp/persist'
base_install_path_on_device: '/tmp/ota'
project_access_token: ${{ secrets.TEST_PROJECT_ACCESS_TOKEN }}
signing_key_management: 'local'
Expand Down Expand Up @@ -64,8 +64,8 @@ jobs:
with:
release_name: 'archive-release ${{ env.TIMESTAMP }}'
release_type: 'zip_archive'
persist_dir: '/tmp/persist'
zip_archive_dir: 'artifacts'
persist_dir_on_device: '/tmp/persist'
base_install_path_on_device: '/tmp/ota'
project_access_token: ${{ secrets.TEST_PROJECT_ACCESS_TOKEN }}
signing_key_management: 'local'
Expand Down Expand Up @@ -93,8 +93,8 @@ jobs:
with:
release_name: 'rootfs-release ${{ env.TIMESTAMP }}'
release_type: 'rootfs'
persist_dir: '/tmp/persist'
rootfs_img_path: 'rootfs.img'
persist_dir_on_device: '/tmp/persist'
project_access_token: ${{ secrets.TEST_PROJECT_ACCESS_TOKEN }}
signing_key_management: 'local'
signing_key: ${{ secrets.TEST_SIGNING_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
with:
release_name: 'OPTIONAL RELEASE NAME'
release_type: 'file'
persist_dir: '/tmp/persist'
artifacts_dir: 'artifacts'
persist_dir_on_device: '/tmp/persist'
base_install_path_on_device: '/tmp/ota'
project_access_token: ${{ secrets.PROJECT_ACCESS_TOKEN }}
signing_key_management: 'local'
Expand All @@ -75,8 +75,8 @@ the "OTA Release" step as
with:
release_name: 'OPTIONAL RELEASE NAME'
release_type: 'rootfs'
persist_dir: '/tmp/persist'
rootfs_img_path: '/path/to/rootfs.img'
persist_dir_on_device: '/tmp/persist'
project_access_token: ${{ secrets.PROJECT_ACCESS_TOKEN }}
signing_key_management: 'local'
signing_key: ${{ secrets.SIGNING_KEY }}
Expand All @@ -91,8 +91,8 @@ For zip archive update, configure the "OTA Release" step as
with:
release_name: 'OPTIONAL RELEASE NAME'
release_type: 'zip_archive'
persist_dir: '/tmp/persist'
zip_archive_dir: '/path/to/uncompressed_artifacts_dir'
persist_dir_on_device: '/tmp/persist'
base_install_path_on_device: '/tmp/ota'
project_access_token: ${{ secrets.PROJECT_ACCESS_TOKEN }}
signing_key_management: 'local'
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
description: 'Release type ("file", "zip_archive", or "rootfs")'
required: true
default: 'file'
persist_dir:
persist_dir_on_device:
description: 'Path to the directory where the device can persist data'
required: true
default: ''
Expand Down
7 changes: 5 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# INPUT_RELEASE_NAME
# INPUT_RELEASE_TYPE
# INPUT_PERSIST_DIR
# INPUT_PERSIST_DIR_ON_DEVICE
# INPUT_ARTIFACTS_DIR
# INPUT_ROOTFS_IMG_PATH
# INPUT_ZIP_ARCHIVE_DIR
Expand Down Expand Up @@ -49,9 +49,12 @@ download_trh() {

get_manifest_template_hack() {
# Hack alert: Need to do this to get a manifest template
local persist_dir="${INPUT_PERSIST_DIR_ON_DEVICE:-}"
[ -z "${persist_dir}" ] && err "No persist directory provided"

mkdir -p "$(dirname "${THISTLE_KEY}")"
echo "${INPUT_SIGNING_KEY}" > "${THISTLE_KEY}"
"${TRH_BINARY_PATH}" init --persist="${INPUT_PERSIST_DIR}" > /dev/null
"${TRH_BINARY_PATH}" init --persist="${persist_dir}" > /dev/null
}

file_release() {
Expand Down