Skip to content

Commit

Permalink
chore: Optimize action
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryFan626 committed Nov 12, 2023
1 parent f4a376e commit 5906935
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ jobs:

- name: Enable TLS 1.0 and 1.1 in java.security
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "${{ env.JAVA_HOME }}/conf/security/java.security"
elif [[ "${{ runner.os }}" == "Linux" ]]; then
sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" ${{ env.JAVA_HOME }}/conf/security/java.security
else
sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" $JAVA_HOME/conf/security/java.security
if [ "$RUNNER_OS" = "Windows" ]; then
sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
elif [ "$RUNNER_OS" = "Linux" ]; then
sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
elif [ "$RUNNER_OS" = "macOS" ]; then
sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
fi
shell: bash


env:
RUNNER_OS: ${{ runner.os }}
JAVA_HOME: ${{ env.JAVA_HOME }}


- name: Copy JRE to static directory
run: |
Expand Down

0 comments on commit 5906935

Please sign in to comment.