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
|
||||
run: npm install @actions/artifact
|
||||
- name: Build and upload artifacts
|
||||
uses: actions/github-script@v4
|
||||
uses: actions/github-script@v7
|
||||
id: boards-list
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const artifact = require('@actions/artifact');
|
||||
const artifactClient = artifact.create();
|
||||
const {default: artifact} = require('@actions/artifact');
|
||||
|
||||
const execSync = require('child_process').execSync;
|
||||
|
||||
|
@ -90,7 +89,7 @@ jobs:
|
|||
const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : '';
|
||||
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) {
|
||||
console.error(`::error::Failed to build or upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
||||
console.error(e);
|
||||
|
@ -111,7 +110,7 @@ jobs:
|
|||
include-list: ${{ steps.compile-list.outputs.result }}
|
||||
steps:
|
||||
- name: Join build lists
|
||||
uses: actions/github-script@v4
|
||||
uses: actions/github-script@v7
|
||||
id: compile-list
|
||||
with:
|
||||
script: |
|
||||
|
@ -158,7 +157,7 @@ jobs:
|
|||
node-version: "14.x"
|
||||
- name: Install js-yaml
|
||||
run: npm install js-yaml
|
||||
- uses: actions/github-script@v4
|
||||
- uses: actions/github-script@v7
|
||||
id: core-list
|
||||
with:
|
||||
script: |
|
||||
|
@ -187,7 +186,7 @@ jobs:
|
|||
node-version: "14.x"
|
||||
- name: Install js-yaml
|
||||
run: npm install js-yaml
|
||||
- uses: actions/github-script@v4
|
||||
- uses: actions/github-script@v7
|
||||
id: boards-list
|
||||
with:
|
||||
script: |
|
||||
|
@ -264,7 +263,7 @@ jobs:
|
|||
nightly-include: ${{ steps.nightly-list.outputs.result }}
|
||||
steps:
|
||||
- name: Create nightly list
|
||||
uses: actions/github-script@v4
|
||||
uses: actions/github-script@v7
|
||||
id: nightly-list
|
||||
with:
|
||||
script: |
|
||||
|
@ -315,7 +314,7 @@ jobs:
|
|||
- name: Install js-yaml
|
||||
run: npm install js-yaml
|
||||
- name: Aggregate Metadata
|
||||
uses: actions/github-script@v4
|
||||
uses: actions/github-script@v7
|
||||
id: aggregate-metadata
|
||||
with:
|
||||
script: |
|
||||
|
@ -333,7 +332,7 @@ jobs:
|
|||
result-encoding: string
|
||||
|
||||
- name: Organize Metadata
|
||||
uses: actions/github-script@v4
|
||||
uses: actions/github-script@v7
|
||||
id: organize-metadata
|
||||
with:
|
||||
script: |
|
||||
|
@ -390,7 +389,7 @@ jobs:
|
|||
id: changed-files
|
||||
with:
|
||||
format: "json"
|
||||
- uses: actions/github-script@v4
|
||||
- uses: actions/github-script@v7
|
||||
id: board-changes
|
||||
with:
|
||||
script: |
|
||||
|
@ -398,7 +397,7 @@ jobs:
|
|||
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
|
||||
return boardChanges.length ? 'true' : 'false';
|
||||
result-encoding: string
|
||||
- uses: actions/github-script@v4
|
||||
- uses: actions/github-script@v7
|
||||
id: core-changes
|
||||
with:
|
||||
script: |
|
||||
|
|
Loading…
Add table
Reference in a new issue