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

act is not respecting "if: steps.bincache.outputs.cache-hit != true" #286

Closed
grische opened this issue Jun 20, 2020 · 1 comment
Closed
Labels
meta/duplicate This issue or pull request already exists

Comments

@grische
Copy link

grische commented Jun 20, 2020

I am trying to use the following actions files, but unfortunately even though actions/cache@v2 always fails and sets ::set-output:: cache-hit=false, the following step Download binaries is never executed.

on: push

jobs:
  cache_test:
    runs-on: ubuntu-18.04
    steps:
      - name: Downloads cache
        uses: actions/cache@v2
        id: bincache
        with:
          path: mybins
          key: ${{ runner.os }}-${{ hashFiles('**/tools/utils/download_bins.sh') }}

      - name: Download binaries
        if: steps.bincache.outputs.cache-hit != 'true'
        run: bash tools/utils/download_bins.sh
$ act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 push
[cache-test.yaml/cache_test] 🚀  Start image=nektos/act-environments-ubuntu:18.04
[cache-test.yaml/cache_test]   🐳  docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[cache-test.yaml/cache_test] ⭐   Run Downloads cache
[cache-test.yaml/cache_test]   ☁  git clone 'https://github.com/actions/cache' # ref=v2
[cache-test.yaml/cache_test]   🐳  docker cp src=/home/grische/.cache/act/actions-cache@v2 dst=/actions/
[cache-test.yaml/cache_test]   ❓   ::save-state name=CACHE_KEY::Linux-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
[cache-test.yaml/cache_test]   💬  ::debug::Resolved Keys:
[cache-test.yaml/cache_test]   💬  ::debug::["Linux-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"]
[cache-test.yaml/cache_test]   💬  ::debug::Checking zstd --version
[cache-test.yaml/cache_test]   💬  ::debug::Unable to locate executable file: zstd. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
[cache-test.yaml/cache_test]   💬  ::debug::
[cache-test.yaml/cache_test]   💬  ::debug::getCacheEntry - Attempt 1 of 2 failed with error: Cache Service Url not found, unable to restore cache.
[cache-test.yaml/cache_test]   💬  ::debug::getCacheEntry - Attempt 2 of 2 failed with error: Cache Service Url not found, unable to restore cache.
| [warning]getCacheEntry failed: Cache Service Url not found, unable to restore cache.
[cache-test.yaml/cache_test]   ⚙  ::set-output:: cache-hit=false
[cache-test.yaml/cache_test]   ✅   Success - Downloads cache

Running with act -v, also outputs the following line:

...
DEBU[0000] Skipping step 'Download binaries' due to 'steps.bincache.outputs.cache-hit != 'true''
[cache-test.yaml/cache_test] Removed container: 6ad084f888312c4c97e32bf16b2ec4e07ece7b68da5aed4934fe6e731a047a55
[cache-test.yaml/cache_test]   🐳  docker volume rm act-pull-requests-yml-cache-test
@cplee
Copy link
Contributor

cplee commented Jun 23, 2020

dup #104

@cplee cplee closed this as completed Jun 23, 2020
@cplee cplee added the meta/duplicate This issue or pull request already exists label Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants