mirror of https://github.com/actions/toolkit
parent
2178f0baee
commit
4f7fb6513a
|
@ -46,9 +46,10 @@ jobs:
|
||||||
working-directory: packages/artifact
|
working-directory: packages/artifact
|
||||||
|
|
||||||
- name: Set artifact file contents
|
- name: Set artifact file contents
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "::set-env name=non-gzip-artifact-content::hello"
|
echo "non-gzip-artifact-content=hello" >> $GITHUB_ENV
|
||||||
echo "::set-env name=gzip-artifact-content::Some large amount of text that has a compression ratio that is greater than 100%. If greater than 100%, gzip is used to upload the file"
|
echo "gzip-artifact-content=Some large amount of text that has a compression ratio that is greater than 100%. If greater than 100%, gzip is used to upload the file" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create files that will be uploaded
|
- name: Create files that will be uploaded
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
// Certain env variables are not set by default in a shell context and are only available in a node context from a running action
|
// Certain env variables are not set by default in a shell context and are only available in a node context from a running action
|
||||||
// In order to be able to upload and download artifacts e2e in a shell when running CI tests, we need these env variables set
|
// In order to be able to upload and download artifacts e2e in a shell when running CI tests, we need these env variables set
|
||||||
console.log(`::set-env name=ACTIONS_RUNTIME_URL::${process.env.ACTIONS_RUNTIME_URL}`)
|
const fs = require('fs');
|
||||||
console.log(`::set-env name=ACTIONS_RUNTIME_TOKEN::${process.env.ACTIONS_RUNTIME_TOKEN}`)
|
const os = require('os');
|
||||||
console.log(`::set-env name=GITHUB_RUN_ID::${process.env.GITHUB_RUN_ID}`)
|
const filePath = process.env[`GITHUB_ENV`]
|
||||||
|
fs.appendFileSync(filePath, `ACTIONS_RUNTIME_URL=${process.env.ACTIONS_RUNTIME_URL}${os.EOL}`, {
|
||||||
|
encoding: 'utf8'
|
||||||
|
})
|
||||||
|
fs.appendFileSync(filePath, `ACTIONS_RUNTIME_TOKEN=${process.env.ACTIONS_RUNTIME_TOKEN}${os.EOL}`, {
|
||||||
|
encoding: 'utf8'
|
||||||
|
})
|
||||||
|
fs.appendFileSync(filePath, `GITHUB_RUN_ID=${process.env.GITHUB_RUN_ID}${os.EOL}`, {
|
||||||
|
encoding: 'utf8'
|
||||||
|
})
|
|
@ -1,5 +1,14 @@
|
||||||
// Certain env variables are not set by default in a shell context and are only available in a node context from a running action
|
// Certain env variables are not set by default in a shell context and are only available in a node context from a running action
|
||||||
// In order to be able to restore and save cache e2e in a shell when running CI tests, we need these env variables set
|
// In order to be able to restore and save cache e2e in a shell when running CI tests, we need these env variables set
|
||||||
console.log(`::set-env name=ACTIONS_RUNTIME_URL::${process.env.ACTIONS_RUNTIME_URL}`)
|
const fs = require('fs');
|
||||||
console.log(`::set-env name=ACTIONS_RUNTIME_TOKEN::${process.env.ACTIONS_RUNTIME_TOKEN}`)
|
const os = require('os');
|
||||||
console.log(`::set-env name=GITHUB_RUN_ID::${process.env.GITHUB_RUN_ID}`)
|
const filePath = process.env[`GITHUB_ENV`]
|
||||||
|
fs.appendFileSync(filePath, `ACTIONS_RUNTIME_URL=${process.env.ACTIONS_RUNTIME_URL}${os.EOL}`, {
|
||||||
|
encoding: 'utf8'
|
||||||
|
})
|
||||||
|
fs.appendFileSync(filePath, `ACTIONS_RUNTIME_TOKEN=${process.env.ACTIONS_RUNTIME_TOKEN}${os.EOL}`, {
|
||||||
|
encoding: 'utf8'
|
||||||
|
})
|
||||||
|
fs.appendFileSync(filePath, `GITHUB_RUN_ID=${process.env.GITHUB_RUN_ID}${os.EOL}`, {
|
||||||
|
encoding: 'utf8'
|
||||||
|
})
|
Loading…
Reference in New Issue