title: Github actions/cache has no effect on my workflow
body: <p>I am trying to run the following Github workflow for a php project:</p>
  
  <pre><code>name: CI
  
  on: [push, pull_request]
  jobs:
    test:
      runs-on: ubuntu-latest
      env:
        DB_NAME: ${{ secrets.DB_NAME }}
        DB_USER: ${{ secrets.DB_USER }}
        DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
        MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_ROOT_PASSWORD }}
  
      steps:
      - uses: actions/checkout@v2
  
      - name: Set up the CI environment
        run: |
          envsubst &lt; src/.env.ci &gt; src/.env
          docker pull composer
          alias composer="docker run --rm --interactive --tty --volume $(pwd):/app --volume ${COMPOSER_HOME:-$HOME/.composer}:/tmp --user $(id -u):$(id -g) composer"
          composer --version
  
      - name: Get Composer Cache Directory
        id: composer-cache
        run: |
          echo "::set-output name=dir::$(composer config cache-files-dir)"
  
      - uses: actions/cache@v1
        with:
          path: ${{ steps.composer-cache.outputs.dir }}
          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
          restore-keys: |
            ${{ runner.os }}-composer-
  
      - name: Install composer dependencies
        if: steps.composer-cache.outputs.cache-hit != 'true'
        run: composer install
  </code></pre>
  
  <p>The scenario is the following. I have a docker based development environment orchestrated with docker-compose. Php composer and other tools are run from docker images.</p>
  
  <p>It seems that i am missing something here because the <code>cache-hit</code> is taking place as I see in logs:</p>
  
  <pre><code>2020-03-28T10:37:07.2837003Z Cache restored from key: Linux-composer-0dffe7e110c8249b30d4e46844fede7ea6b8e1433061bed12cbb9a2ae964e2bb
  </code></pre>
  
  <p>But is not taking effect because the step <code>Install composer dependencies</code> is still running and <strong>downloading</strong> artifacts. My expectation is that either does not run or run but does not download anything since it takes all from restored cached.</p>
  
  <p>Does anyone have an idea of what I am missing?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I did accepted @edric answer because on this context where i asked my question his answer provided the solution for my question. Although I muss say it was not completely the solution. </p>
  
  <p>I needed to delete the condition: <code>if: steps.composer-cache.outputs.cache-hit != 'true'</code> from last step to get the rest of my workflow running. I did noticed that the composer cache was 
  restored and that <code>composer install</code> was not run, causing problems later on due to missing dependencies. Without the if condition composer install run always but using the restored cache. </p>