actions / cache

Cache dependencies and build outputs in GitHub Actions
MIT License
4.39k stars 1.17k forks source link

Github Actions: Image is pulled even if step is skipped #1182

Closed matheensyedaslam closed 7 months ago

matheensyedaslam commented 1 year ago

Github actions workflow as:

      - name: Lint Code Base
        uses: github/super-linter@v5
        env:
          VALIDATE_ALL_CODEBASE: false
          DEFAULT_BRANCH: master
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Above linter image takes ~2 mins to pull the image and when we skip the stage it still pulls the image When run, if the "if" doesn't trigger the step gets skipped, but the container image for the action still gets pulled at the start of the workflow. Presumably because we're evaluating the "uses:" statements first. Is there a way to avoid this? Causing efficiency issues pulling images which aren't going to get used.

Screenshot 2023-06-08 at 1 17 06 PM
github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.

github-actions[bot] commented 7 months ago

This issue was closed because it has been inactive for 5 days since being marked as stale.