arduino / arduino/setup-task

Task doesn't stay cached on hosted runners

Open
#763 0 comments 5 reactions 0 assignees View on GitHub
type: imperfection
Dominant language
TypeScript
Stars
153
Forks
23
Avg merge
13h 50m
Merged PRs (30d)
17

Description

### Describe the problem

Hi,

I'm using the action in a pretty basic way
```
- name: Install Task
uses: arduino/setup-task@v1
```

I can see that task is being downloaded and installed fine. Including putting the binary into the cache `/opt/hostedtoolcache`
```
Run arduino/setup-task@v1
##[debug]evaluating 48 versions
##[debug]matched: 3.27.1
##[debug]isExplicit: 3.27.1
##[debug]explicit? true
##[debug]checking cache: /opt/hostedtoolcache/task/3.27.1/x64
##[debug]not found
##[debug]Downloading https://github.com/go-task/task/releases/download/v3.27.1/task_linux_amd64.tar.gz
##[debug]Destination /home/runner/work/_temp/48d9cae5-85e4-4813-889d-6eee437c83d4
##[debug]download complete
##[debug]Checking tar --version
##[debug]tar (GNU tar) 1.34
##[debug]Copyright (C) 2021 Free Software Foundation, Inc.
##[debug]License GPLv3+: GNU GPL version 3 or later .
##[debug]This is free software: you are free to change and redistribute it.
##[debug]There is NO WARRANTY, to the extent permitted by law.
##[debug]
##[debug]Written by John Gilmore and Jay Fenlason.
/usr/bin/tar xz -v --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/1e0ab5e3-0808-4e1f-853a-0998fcd9c1ef -f /home/runner/work/_temp/48d9cae5-85e4-4813-889d-6eee437c83d4
LICENSE
README.md
completion/bash/task.bash
completion/fish/task.fish
completion/ps/task.ps1
completion/zsh/_task
task
##[debug]Caching tool task 3.27.1 x64
##[debug]source dir: /home/runner/work/_temp/1e0ab5e3-0808-4e1f-853a-0998fcd9c1ef
##[debug]destination /opt/hostedtoolcache/task/3.27.1/x64
##[debug]finished caching tool
##[debug]Task cached under /opt/hostedtoolcache/task/3.27.1/x64
Successfully setup Task version v3.27.1
```

However when I run a job again (with a new commit), I don't see the task binary being found in the cache, nor do I see any task-related caches in the github actions cache UI. Is this desired behaviour?

Thanks

### To reproduce

Run the action multiple times (with new commits)

### Expected behavior

I would expect the task binary to be cached in my action, and not re-downloaded.

### 'arduino/setup-task' version

@v1

### Additional context

_No response_

### Issue checklist

- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/setup-task/issues?q=)
- [X] I verified the problem still occurs when using the latest version
- [X] My report contains all necessary details

Contributor guide

Open the contributing guide

Research direction

Reproduce the workflow using arduino/setup-task@v1 across multiple commits, comparing the hosted runner tool-cache logs with the GitHub Actions cache UI. Trace the setup action's caching entry point and determine whether a later run reuses the Task binary instead of downloading it again. Done when the observed behavior is explained and the expected caching behavior is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.