Skip to content

Commit 8767d1c

Browse files
committed
Get full name of archive directory
1 parent 5d55c4b commit 8767d1c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ runs:
4646
shell: bash
4747
run: |
4848
if [[ "${{ steps.mapping.outputs.codee_archive_extension }}" == "zip" ]]; then
49+
TOP_DIR=$(unzip -qql "${RUNNER_TEMP}/codee.zip" | head -n1 | awk '{print $4}' | cut -d/ -f1)
4950
unzip -qq ${RUNNER_TEMP}/codee.zip -d ${RUNNER_TEMP}/codee-tmp
50-
mv ${RUNNER_TEMP}/codee-tmp/* ${RUNNER_TEMP}/codee/
51+
mv ${RUNNER_TEMP}/codee-tmp/${TOP_DIR}/ ${RUNNER_TEMP}/codee/
5152
rm -rf ${RUNNER_TEMP}/codee-tmp
5253
else
5354
mkdir -p ${RUNNER_TEMP}/codee/

0 commit comments

Comments
 (0)