Skip to content

Commit 36eb591

Browse files
authored
Print auto-detected architecture when sublime-text-arch not set (#302)
This commit improves output in the CI. With `sublime-text-arch` input being optional now, when not specified the CI output just said ``` env: SUBLIME_TEXT_ARCH: ``` Auto-detect in the action also so that it actually prints what is being used.
1 parent af0a1ed commit 36eb591

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎actions/setup/action.yaml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,17 @@ runs:
9595
exit 1
9696
esac
9797
echo "SUBLIME_TEXT_PACKAGES=$STP" >> $GITHUB_ENV
98-
echo "SUBLIME_TEXT_ARCH=${{ inputs.sublime-text-arch }}" >> $GITHUB_ENV
98+
ST_ARCH="${{ inputs.sublime-text-arch }}"
99+
if [ -n "$ST_ARCH" ]; then
100+
echo "Sublime Text architecture: $ST_ARCH (specified by input)"
101+
else
102+
case "${{ runner.arch }}" in
103+
ARM64) ST_ARCH=arm64 ;;
104+
*) ST_ARCH=x64 ;;
105+
esac
106+
echo "Sublime Text architecture: $ST_ARCH (autodetected from runner arch ${{ runner.arch }})"
107+
fi
108+
echo "SUBLIME_TEXT_ARCH=$ST_ARCH" >> $GITHUB_ENV
99109
echo "SUBLIME_TEXT_VERSION=${{ inputs.sublime-text-version }}" >> $GITHUB_ENV
100110
shell: bash
101111
- name: Setup Graphical User Interface

0 commit comments

Comments
 (0)