Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RUNNER_TEMP instead of os.tmpdir #351

Merged
merged 1 commit into from
Jan 1, 2023
Merged

Use RUNNER_TEMP instead of os.tmpdir #351

merged 1 commit into from
Jan 1, 2023

Conversation

int128
Copy link
Owner

@int128 int128 commented Jan 1, 2023

This may resolve the issue #347.

As actions/toolkit#518, it would be preferred to use RUNNER_TEMP for security. Also better for self-hosted runners, because RUNNER_TEMP may be mountable from a separated Docker container.

@int128 int128 marked this pull request as ready for review January 1, 2023 05:33
const args = generateArgs(inputs, outputDir)
const runnerTempDir = process.env.RUNNER_TEMP || os.tmpdir()
const outputsDir = await fs.mkdtemp(path.join(runnerTempDir, 'kaniko-action-'))
const args = generateArgs(inputs, outputsDir)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For GitHub-hosted runners,

/usr/bin/docker run --rm
 -v /home/runner/work/kaniko-action/kaniko-action/tests/fixtures:/kaniko/action/context:ro
 -v /home/runner/work/_temp/kaniko-action-176zzr:/kaniko/action/outputs
 -v /home/runner/.docker/:/kaniko/.docker/:ro
 -e container=docker 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant