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

fix: handle .net installation on different alpine versions #110

Merged
merged 1 commit into from
Jun 17, 2024
Merged
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
34 changes: 32 additions & 2 deletions .github/actions/dotnet/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,42 @@ runs:
test -f global.json || echo $'{ "sdk": { "version": "${{ inputs.DOTNET_VERSION }}", "rollForward": "latestMajor" } }' > global.json
working-directory: ${{ inputs.WORKING_DIRECTORY }}

- name: Install .NET dependencies for Alpine
- name: Install Bash
if: ${{ inputs.ALPINE_OS == 'true' }}
shell: ${{ inputs.SHELL }}
run: |
apk add bash

- name: Install .NET common dependencies for Alpine
if: ${{ inputs.ALPINE_OS == 'true' }}
shell: bash
run: |
# Dependencies: https://learn.microsoft.com/en-us/dotnet/core/install/linux-alpine
apk add bash libgcc libssl3 libstdc++ zlib

- name: Install .NET dependencies for Alpine
if: ${{ inputs.ALPINE_OS == 'true' }}
shell: bash
run: |
# Dependencies: https://learn.microsoft.com/en-us/dotnet/core/install/linux-alpine
apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib
specified_major_version=3
specified_minor_version=18

# Extract the version from the file
version=$(cat /etc/alpine-release)

# Parse the major and minor versions from the extracted version
major_version=$(echo $version | cut -d. -f1)
minor_version=$(echo $version | cut -d. -f2)

# Dependencies for v3.18+
if [[ $major_version -eq $specified_major_version && $minor_version -ge $specified_minor_version ]]; then
echo "Alpine >= v3.18"
apk add ca-certificates-bundle
else
echo "Alpine <= v3.17"
apk add icu-libs krb5-libs libintl
fi

- name: Install Timezone package
if: ${{ inputs.ALPINE_OS == 'true' }}
Expand Down