Compare commits

...

2 Commits

2 changed files with 19 additions and 3 deletions

View File

@ -18,7 +18,7 @@ jobs:
steps:
- name: Retrieve root ca certificate
id: get-ca-cert
uses: RouxAntoine/get-ca-cert@master
uses: https://antoine-roux.tk/projects/actions/get-ca-cert@v1.1.0
- run: |
echo "${{ steps.get-ca-cert.outputs.ca-cert }}"
@ -30,7 +30,7 @@ jobs:
java-version: '21'
- name: Add root certificate to java truststore
uses: RouxAntoine/add-ca-truststore@master
uses: https://antoine-roux.tk/projects/actions/add-ca-truststore@v1.2.0
id: add-ca-to-truststore
with:
ca-cert: "${{ steps.get-ca-cert.outputs.ca-cert }}"

View File

@ -18,6 +18,10 @@ inputs:
description: "java store password"
required: false
default: "changeit"
debug:
description: "show debug information about certificate truststore content"
required: false
default: "false"
outputs:
certificate-alias:
value: ${{ steps.generate-alias-name.outputs.alias-name }}
@ -59,4 +63,16 @@ runs:
echo "${{ inputs.ca-cert }}" | keytool -import -noprompt -trustcacerts -alias ${{ steps.generate-alias-name.outputs.alias-name }} -keystore ${{ inputs.store-path }} -storepass ${{ inputs.store-password }};
else
echo "Certificate ${{ steps.generate-alias-name.outputs.alias-name }} already contained in the truststore";
fi
fi
- name: Show added ${{ steps.generate-alias-name.outputs.alias-name }} for debugging
if: ${{ inputs.debug == 'true' }}
shell: bash
run: |
keytool -list -cacerts | grep antoine
- name: List cert for debugging
if: ${{ inputs.debug == 'true' }}
shell: bash
run: |
keytool -list -cacerts