Update merge_request_app_id.yml

Signed-off-by: wilkis <marvin+github@alruno.eu>
This commit is contained in:
wilkis
2025-09-30 05:17:28 +00:00
committed by GitHub
parent 8c69f77f76
commit 71dcc9de0a

View File

@@ -25,6 +25,8 @@ jobs:
- name: Validate each CSR
if: ${{ steps.changed_csrs.outputs.csr_files }}
run: |
for filename in ${{ steps.changed_csrs.outputs.csr_files }}; do
openssl req -in $filename.csr -noout -subject | awk -v app_id="$filename" -F "=" '{ if ($3==app_id) { exit 0 } else { exit 1 }}'
for csr in ${{ steps.changed_csrs.outputs.csr_files }}; do
filename=$(echo $csr | awk -F "[/.]" '{ print $2 }')
subject=$(cat $csr | openssl req -noout -subject)
echo $subject | awk -v app_id="$filename" -F "[= ]" '{ if ($5==app_id) { exit 0 } else { exit 1 }}'
done