fix(ci): Upgrade to github-script@v7
* Also adjust form @actions/upload API changes.
This commit is contained in:
parent
ff57ccc75a
commit
52ed49b4bb
1 changed files with 11 additions and 12 deletions
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
|
@ -55,13 +55,12 @@ jobs:
|
||||||
- name: Install @actions/artifact
|
- name: Install @actions/artifact
|
||||||
run: npm install @actions/artifact
|
run: npm install @actions/artifact
|
||||||
- name: Build and upload artifacts
|
- name: Build and upload artifacts
|
||||||
uses: actions/github-script@v4
|
uses: actions/github-script@v7
|
||||||
id: boards-list
|
id: boards-list
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const artifact = require('@actions/artifact');
|
const {default: artifact} = require('@actions/artifact');
|
||||||
const artifactClient = artifact.create();
|
|
||||||
|
|
||||||
const execSync = require('child_process').execSync;
|
const execSync = require('child_process').execSync;
|
||||||
|
|
||||||
|
@ -90,7 +89,7 @@ jobs:
|
||||||
const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : '';
|
const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : '';
|
||||||
const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`;
|
const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`;
|
||||||
|
|
||||||
await artifactClient.uploadArtifact(artifactName, files, rootDirectory, options);
|
await artifact.uploadArtifact(artifactName, files, rootDirectory, options);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`::error::Failed to build or upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
console.error(`::error::Failed to build or upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
@ -111,7 +110,7 @@ jobs:
|
||||||
include-list: ${{ steps.compile-list.outputs.result }}
|
include-list: ${{ steps.compile-list.outputs.result }}
|
||||||
steps:
|
steps:
|
||||||
- name: Join build lists
|
- name: Join build lists
|
||||||
uses: actions/github-script@v4
|
uses: actions/github-script@v7
|
||||||
id: compile-list
|
id: compile-list
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
@ -158,7 +157,7 @@ jobs:
|
||||||
node-version: "14.x"
|
node-version: "14.x"
|
||||||
- name: Install js-yaml
|
- name: Install js-yaml
|
||||||
run: npm install js-yaml
|
run: npm install js-yaml
|
||||||
- uses: actions/github-script@v4
|
- uses: actions/github-script@v7
|
||||||
id: core-list
|
id: core-list
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
@ -187,7 +186,7 @@ jobs:
|
||||||
node-version: "14.x"
|
node-version: "14.x"
|
||||||
- name: Install js-yaml
|
- name: Install js-yaml
|
||||||
run: npm install js-yaml
|
run: npm install js-yaml
|
||||||
- uses: actions/github-script@v4
|
- uses: actions/github-script@v7
|
||||||
id: boards-list
|
id: boards-list
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
@ -264,7 +263,7 @@ jobs:
|
||||||
nightly-include: ${{ steps.nightly-list.outputs.result }}
|
nightly-include: ${{ steps.nightly-list.outputs.result }}
|
||||||
steps:
|
steps:
|
||||||
- name: Create nightly list
|
- name: Create nightly list
|
||||||
uses: actions/github-script@v4
|
uses: actions/github-script@v7
|
||||||
id: nightly-list
|
id: nightly-list
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
@ -315,7 +314,7 @@ jobs:
|
||||||
- name: Install js-yaml
|
- name: Install js-yaml
|
||||||
run: npm install js-yaml
|
run: npm install js-yaml
|
||||||
- name: Aggregate Metadata
|
- name: Aggregate Metadata
|
||||||
uses: actions/github-script@v4
|
uses: actions/github-script@v7
|
||||||
id: aggregate-metadata
|
id: aggregate-metadata
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
@ -333,7 +332,7 @@ jobs:
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
|
|
||||||
- name: Organize Metadata
|
- name: Organize Metadata
|
||||||
uses: actions/github-script@v4
|
uses: actions/github-script@v7
|
||||||
id: organize-metadata
|
id: organize-metadata
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
@ -390,7 +389,7 @@ jobs:
|
||||||
id: changed-files
|
id: changed-files
|
||||||
with:
|
with:
|
||||||
format: "json"
|
format: "json"
|
||||||
- uses: actions/github-script@v4
|
- uses: actions/github-script@v7
|
||||||
id: board-changes
|
id: board-changes
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
@ -398,7 +397,7 @@ jobs:
|
||||||
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
|
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
|
||||||
return boardChanges.length ? 'true' : 'false';
|
return boardChanges.length ? 'true' : 'false';
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
- uses: actions/github-script@v4
|
- uses: actions/github-script@v7
|
||||||
id: core-changes
|
id: core-changes
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
|
Loading…
Add table
Reference in a new issue