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

Update the GitHub action to explicitly support read_remote_cache #492

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/toast/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ const { v4: uuidv4 } = require('uuid');
const tasksInput = core.getInput('tasks').trim();
const fileInput = core.getInput('file').trim();
const dockerRepoInput = core.getInput('docker_repo').trim();
const readRemoteCacheInput = core.getInput('read_remote_cache').trim();
const writeRemoteCacheInput = core.getInput('write_remote_cache').trim();

// Parse the action inputs.
const tasks = tasksInput === '' ? null : tasksInput.split(/\s+/);
const file = fileInput === '' ? null : fileInput;
const dockerRepo = dockerRepoInput === '' ? null : dockerRepoInput;
const readRemoteCache = readRemoteCacheInput == 'true';
const writeRemoteCache = writeRemoteCacheInput == 'true';

// Where to install Toast
Expand All @@ -37,7 +39,7 @@ childProcess.execSync(
const taskArgs = tasks === null ? [] : tasks;
const fileArgs = file === null ? [] : ['--file', file];
const dockerRepoArgs = dockerRepo === null ? [] : ['--docker-repo', dockerRepo];
const readRemoteCacheArgs = dockerRepo === null ? [] : ['--read-remote-cache', 'true'];
const readRemoteCacheArgs = readRemoteCache ? ['--write-remote-cache', 'true'] : [];
const writeRemoteCacheArgs = writeRemoteCache ? ['--write-remote-cache', 'true'] : [];

// Run Toast.
Expand Down
Loading