Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
Signed-off-by: Stephan Wendel <[email protected]>
  • Loading branch information
KwadFan committed Feb 18, 2024
1 parent d30b811 commit f0a74ed
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ runs:
echo "::group::Generate CustomPIOS config file"
CONFIG_BASE_DIR="./repository/config"
DEFAULT_CONF="./repository/config/config-defaults.conf"
SBC_CONFIG="${CONFIG_BASE_DIR}/${TYPE}"
TMP_CONFIG="/tmp/config.tmp"
DEFAULT_CONF="./repository/config/config-defaults.conf"
CONFIG_PATH="./repository/src/config"
generate_header() {
echo "#!/bin/bash" >> "${TMP_CONFIG}"
Expand All @@ -79,29 +80,39 @@ runs:
fi
}
generate_exports() {
for x in $(grep "^[A-Z]" ./out/config.tmp | cut -d'=' -f1 | sort); do
echo "export ${x}" >> "${TMP_CONFIG}"
done
}
copy_config() {
mv "${TMP_CONFIG}" "${CONFIG_PATH}"
}
main() {
generate_header
concat_helper "${DEFAULT_CONF}"
concat_helper "${SBC_CONFIG}/${TYPE_CONFIG}"
concat_helper "${SBC_CONFIG}/${BOARD_CONFIG}"
generate_exports
copy_config
# Write config to debug
echo "::group::Print config file"
cat "${TMP_CONFIG}" | uniq -u
cat "${CONFIG_PATH}"
echo "::endgroup::"
echo "::group::Generate Step output"
source ./repository/src/config
echo "DEBUG:"
echo "DOWNLOAD_URL_CHECKSUM=${DOWNLOAD_URL_CHECKSUM}" | tee -a "$GITHUB_OUTPUT"
echo "DOWNLOAD_URL_IMAGE=${DOWNLOAD_URL_IMAGE}" | tee -a "$GITHUB_OUTPUT"
}
# MAIN
main
# source ./repository/src/config
echo "DOWNLOAD_URL_CHECKSUM=${DOWNLOAD_URL_CHECKSUM}" >> $GITHUB_OUTPUT
echo "DOWNLOAD_URL_IMAGE=${DOWNLOAD_URL_IMAGE}" >> $GITHUB_OUTPUT
echo "MODULES=${MODULES}" >> $GITHUB_OUTPUT
exit 1
- name: Base Image Checksum
id: checksum
shell: bash
Expand Down

0 comments on commit f0a74ed

Please sign in to comment.