mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-22 17:09:08 +08:00
Try using github-script
This commit is contained in:
parent
3f8afe681b
commit
65c1647e72
11
.github/workflows/artifact-tests.yml
vendored
11
.github/workflows/artifact-tests.yml
vendored
@ -59,10 +59,9 @@ jobs:
|
|||||||
echo '${{ env.file1 }}' > artifact-path/first.txt
|
echo '${{ env.file1 }}' > artifact-path/first.txt
|
||||||
echo '${{ env.file2 }}' > artifact-path/second.txt
|
echo '${{ env.file2 }}' > artifact-path/second.txt
|
||||||
|
|
||||||
# We're using node -e to call the functions directly available in the @actions/artifact package
|
- uses: actions/github-script@v6
|
||||||
- name: Upload artifacts using uploadArtifact()
|
with:
|
||||||
run: |
|
script: |
|
||||||
node -e "Promise.resolve(require('./packages/artifact/lib/artifact').create().uploadArtifact('my-artifact-${{ matrix.runs-on }}',['artifact-path/first.txt','artifact-path/second.txt'], process.argv[1]))" "${{ github.workspace }}"
|
const script = require('./packages/artifact/lib/artifact')
|
||||||
|
const uploadResult = await script.create().uploadArtifact('my-artifact-${{ matrix.runs-on }}',['artifact-path/first.txt','artifact-path/second.txt'], ${{ github.workspace }})
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user