Merge pull request #19152 from Ultimaker/fix-printer-linter-injection

Auto-merging to actually test the script
This commit is contained in:
Erwan MATHIEU 2024-05-28 08:56:57 +02:00 committed by GitHub
commit 251c707cb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,7 @@ on:
types: [completed]
jobs:
clang-tidy-results:
printer-linter-result:
# Trigger the job only if the previous (insecure) workflow completed successfully
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
@ -46,7 +46,7 @@ jobs:
const assert = require("node:assert").strict;
const fs = require("fs");
function exportVar(varName, fileName, regEx) {
const val = fs.readFileSync("${{ github.workspace }}/clang-tidy-result/" + fileName, {
const val = fs.readFileSync("${{ github.workspace }}/printer-linter-result/" + fileName, {
encoding: "ascii"
}).trimEnd();
assert.ok(regEx.test(val), "Invalid value format for " + varName);