Giter Site home page Giter Site logo

Comments (8)

lihop avatar lihop commented on August 11, 2024 1

@ButterscotchV Thanks for noting this. I've removed "Fixes #86" from the PR and commit message so that it won't close this issue if merged.

from cache-apt-pkgs-action.

lihop avatar lihop commented on August 11, 2024

I have also encountered this issue.

Running a workflow with debug logging enabled shows that the if condition for the upload-logs step always gets evaluated to a truthy string:

##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: (success() && format('{0} == "true"', inputs.debug))
##[debug]Evaluating And:
##[debug]..Evaluating success:
##[debug]..=> true
##[debug]..Evaluating format:
##[debug]....Evaluating String:
##[debug]....=> '{0} == "true"'
##[debug]....Evaluating Index:
##[debug]......Evaluating inputs:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'debug'
##[debug]....=> 'false'
##[debug]..=> 'false == "true"'
##[debug]=> 'false == "true"'
##[debug]Expanded: (true && 'false == "true"')
##[debug]Result: 'false == "true"'
##[debug]Starting: run

I've opened a PR to fix this: #87.

from cache-apt-pkgs-action.

ButterscotchV avatar ButterscotchV commented on August 11, 2024

Just gonna note quickly that #87 does not fully resolve this issue, as the first bullet will still be incorrect since inputs.version is resolved to true, which is odd.

from cache-apt-pkgs-action.

awalsh128 avatar awalsh128 commented on August 11, 2024

Sorry for the lag. Going through backlog right now and issued a new patch v1.2.3 that rolled up the PR here. Also working through a fix for #84; ongoing work is in the dev branch.

@ButterscotchV could you clarify what you mean about inputs.version evaluating to true? AFAIK, version bumps have forced cache updates properly.

from cache-apt-pkgs-action.

ButterscotchV avatar ButterscotchV commented on August 11, 2024

I'm really not sure if it's a problem, but just at quick observation from the GitHub Actions output, it looks like it's resolving to true rather than 1.0 as I'd expect as I've defined in my workflow file.

Hopefully these screenshots can show what I mean a little better, you can see I have the version set to 1.0 but the output is true. I'm assuming it may be getting evaluated as a boolean, as if 1.0 were to be evaluated as a boolean, you would see true as the output.

Here are screenshots presented in the same order as I listed them in the issue:
From the GitHub Actions run:
image
From the actions.yml file in this repo:
image
From the GitHub Actions workflow file on my repo:
image

from cache-apt-pkgs-action.

awalsh128 avatar awalsh128 commented on August 11, 2024

The first screenshot is for the post_cache_action.sh and the other is for pre_cache_action.sh. 😸

from cache-apt-pkgs-action.

ButterscotchV avatar ButterscotchV commented on August 11, 2024

Ah yep, you're quite right on that, it looks like it's working fine if I'm actually looking at the right one lol. Everything looks all good now, thank you!

from cache-apt-pkgs-action.

awalsh128 avatar awalsh128 commented on August 11, 2024

No problem. 👍

from cache-apt-pkgs-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.