implement `Upload Tagged Daily Release Bundle` step
This commit is contained in:
parent
1ddaf0c496
commit
ca8882d523
|
@ -510,3 +510,11 @@ runs:
|
|||
github_token: ${{env.TOKEN}}
|
||||
custom_tag: ${{ env.release_date }}
|
||||
tag_prefix: ''
|
||||
|
||||
- name: Upload Tagged Daily Release Bundle
|
||||
if: ${{ contains(inputs.uploads, 'bundles') && steps.checkTag.outputs.exists == 'false'}}
|
||||
working-directory: ${{inputs.rusefi_dir}}/artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
: Upload Tagged Daily Release Bundle
|
||||
bash ../firmware/bin/upload_bundle.sh ${{ env.RUSEFI_SSH_USER }} ${{ env.RUSEFI_SSH_PASS }} ${{ env.RUSEFI_SSH_SERVER }} ${{ env.BUNDLE_NAME }} ${{ env.release_date }}
|
||||
|
|
|
@ -4,6 +4,7 @@ USER=$1
|
|||
PASS=$2
|
||||
HOST=$3
|
||||
BUNDLE_FILE_NAME=$4
|
||||
RELEASE_TAG=$5
|
||||
|
||||
SCRIPT_NAME=$(basename "$0")
|
||||
|
||||
|
@ -23,6 +24,10 @@ if [ -n "${USER}" -a -n "$PASS" -a -n "${HOST}" ]; then
|
|||
echo "$SCRIPT_NAME: bundle_upload_folder env variable was not specified using default ${bundle_upload_folder}"
|
||||
fi
|
||||
|
||||
if [ -n "${RELEASE_TAG}" ]; then
|
||||
echo "$SCRIPT_NAME: RELEASE_TAG is ${RELEASE_TAG}"
|
||||
fi
|
||||
|
||||
# technical debt: more than one file uses magic 'rusefi_bundle_' constant, can we extract constant?
|
||||
FULL_BUNDLE_FILE="rusefi_bundle_${BUNDLE_FILE_NAME}.zip"
|
||||
UPDATE_BUNDLE_FILE="rusefi_bundle_${BUNDLE_FILE_NAME}_autoupdate.zip"
|
||||
|
@ -33,12 +38,19 @@ mkdir ${bundle_upload_folder}
|
|||
SSHCMD
|
||||
|
||||
RET=0
|
||||
if [ "$AUTOMATION_LTS" == "true" -a -n "$AUTOMATION_REF" ]; then
|
||||
if [ "$AUTOMATION_LTS" == "true" -a -n "$AUTOMATION_REF" ]; then # lts build
|
||||
DESTINATION_FOLDER="${bundle_upload_folder}/lts/${AUTOMATION_REF}"
|
||||
# sftp does not support -p flag on mkdir :(
|
||||
sshpass -p $PASS sftp -o StrictHostKeyChecking=no ${USER}@${HOST} <<SSHCMD
|
||||
mkdir ${bundle_upload_folder}/lts
|
||||
mkdir ${DESTINATION_FOLDER}
|
||||
SSHCMD
|
||||
elif [ -n "${RELEASE_TAG}" ]; then # daily release with tag
|
||||
DESTINATION_FOLDER="${bundle_upload_folder}/${SHORT_BOARD_NAME}/${RELEASE_TAG}"
|
||||
# sftp does not support -p flag on mkdir :(
|
||||
sshpass -p $PASS sftp -o StrictHostKeyChecking=no ${USER}@${HOST} <<SSHCMD
|
||||
mkdir ${bundle_upload_folder}/${SHORT_BOARD_NAME}
|
||||
mkdir ${DESTINATION_FOLDER}
|
||||
SSHCMD
|
||||
else
|
||||
DESTINATION_FOLDER="${bundle_upload_folder}"
|
||||
|
|
Loading…
Reference in New Issue