Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ inputs:
cache:
description: Used to specify whether caching is needed. Set to true, if you'd like to enable caching.
default: true
restore-only:
description: Do not save the cache. Only applies if cache is enabled.
default: false
cache-dependency-path:
description: 'Used to specify the path to a dependency file - go.sum'
architecture:
Expand Down
3 changes: 2 additions & 1 deletion src/cache-save.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ process.on('uncaughtException', e => {
export async function run(earlyExit?: boolean) {
try {
const cacheInput = core.getBooleanInput('cache');
if (cacheInput) {
const restoreOnly = core.getBooleanInput('restoreOnly');
if (cacheInput && !restoreOnly) {
await cachePackages();

if (earlyExit) {
Expand Down