aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorPeter Johanson <[email protected]>2023-01-05 03:18:27 +0000
committerPete Johanson <[email protected]>2023-01-04 21:40:07 -0600
commit5b9b507de3ef6e7a3bcb1ef61fe6d12ba46b8447 (patch)
treedb02de47e6fe826c1511ec4f5faeff05aae54ffc /.github
parentc23443a086b62833ba0b88dd3a271993d3bc9cea (diff)
downloadzmk-5b9b507de3ef6e7a3bcb1ef61fe6d12ba46b8447.tar.gz
zmk-5b9b507de3ef6e7a3bcb1ef61fe6d12ba46b8447.zip
fix(ci): Escape ` from JSON metadata files.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml24
1 files changed, 12 insertions, 12 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 92df03c3cb..c266cf6066 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -10,7 +10,7 @@ on:
- ".github/workflows/build.yml"
- "app/**"
schedule:
- - cron: '22 4 * * *'
+ - cron: "22 4 * * *"
jobs:
build:
@@ -51,7 +51,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v2
with:
- node-version: '14.x'
+ node-version: "14.x"
- name: Install @actions/artifact
run: npm install @actions/artifact
- name: Build and upload artifacts
@@ -64,7 +64,7 @@ jobs:
const artifactClient = artifact.create();
const execSync = require('child_process').execSync;
-
+
const buildShieldArgs = JSON.parse(`${{ matrix.shieldArgs }}`);
let error = false;
@@ -118,7 +118,7 @@ jobs:
const coreCoverage = `${{ needs.core-coverage.outputs.core-include }}` || "[]";
const boardChanges = `${{ needs.board-changes.outputs.boards-include }}` || "[]";
const nightly = `${{ needs.nightly.outputs.nightly-include }}` || "[]";
-
+
const combined = [
...JSON.parse(coreCoverage),
...JSON.parse(boardChanges),
@@ -148,14 +148,14 @@ jobs:
runs-on: ubuntu-latest
needs: get-changed-files
outputs:
- core-include: ${{ steps.core-list.outputs.result }}
+ core-include: ${{ steps.core-list.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
with:
- node-version: '14.x'
+ node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- uses: actions/github-script@v4
@@ -166,7 +166,7 @@ jobs:
const yaml = require('js-yaml');
const coreCoverage = yaml.load(fs.readFileSync('app/core-coverage.yml', 'utf8'));
-
+
let include = coreCoverage.board.flatMap(board =>
coreCoverage.shield.map(shield => ({ board, shield }))
);
@@ -184,7 +184,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v2
with:
- node-version: '14.x'
+ node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- uses: actions/github-script@v4
@@ -269,7 +269,7 @@ jobs:
with:
script: |
const metadata = JSON.parse(`${{ needs.get-grouped-hardware.outputs.organized-metadata }}`);
-
+
let includeOnboard = metadata.onboard.flatMap(b => {
if (b.siblings) {
return b.siblings.map(board => ({
@@ -311,7 +311,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v2
with:
- node-version: '14.x'
+ node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- name: Aggregate Metadata
@@ -329,7 +329,7 @@ jobs:
yaml.loadAll(fs.readFileSync(f, "utf8"))
);
- return JSON.stringify(aggregated).replace(/\\/g,"\\\\");
+ return JSON.stringify(aggregated).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
result-encoding: string
- name: Organize Metadata
@@ -389,7 +389,7 @@ jobs:
- uses: Ana06/[email protected]
id: changed-files
with:
- format: 'json'
+ format: "json"
- uses: actions/github-script@v4
id: board-changes
with: