Title: Feature request: Do not fail when caching on non-Python repositories · Issue #807 · actions/setup-python · GitHub
Open Graph Title: Feature request: Do not fail when caching on non-Python repositories · Issue #807 · actions/setup-python
X Title: Feature request: Do not fail when caching on non-Python repositories · Issue #807 · actions/setup-python
Description: Description: I am trying to use setup-python in a non Python repository. But I soon as I activate the cache, it ends up with this error: Run actions/setup-python@v5.0.0 with: python-version: 3.12 cache: pip Installed versions Successfull...
Open Graph Description: Description: I am trying to use setup-python in a non Python repository. But I soon as I activate the cache, it ends up with this error: Run actions/setup-python@v5.0.0 with: python-version: 3.12 c...
X Description: Description: I am trying to use setup-python in a non Python repository. But I soon as I activate the cache, it ends up with this error: Run actions/setup-python@v5.0.0 with: python-version: 3.12 c...
Opengraph URL: https://github.com/actions/setup-python/issues/807
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature request: Do not fail when caching on non-Python repositories","articleBody":"**Description:**\r\n\r\nI am trying to use `setup-python` in a non Python repository. But I soon as I activate the cache, it ends up with this error:\r\n\r\n```\r\nRun actions/setup-python@v5.0.0\r\n with:\r\n python-version: 3.12\r\n cache: pip\r\nInstalled versions\r\n Successfully set up CPython (3.12.1)\r\nError: No file in /home/runner/work/awesome-iam/awesome-iam matched to\r\n[**/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository\r\n```\r\n\r\nThats because the project I check out just before has no `**/requirements.txt` or `**/pyproject.toml` file.\r\n\r\nAnd the reason it has no such file is that the `actions/checkout` and `setup-python` steps are located in a reused workflow.\r\n\r\n**Action version:**\r\n`setup-python@v5.0.0`\r\n\r\n**Platform:**\r\n- [x] Ubuntu\r\n- [x] macOS\r\n- [x] Windows\r\n\r\n**Runner type:**\r\n- [x] Hosted\r\n- [ ] Self-hosted\r\n\r\n**Tools version:**\r\nAny version of Python.\r\n\r\n**Repro steps:** \r\n\r\nHere is the source code of my reused workflow: https://github.com/kdeldycke/workflows/blob/f50130aabec1fe713a548e3296f723732c79a178/.github/workflows/lint.yaml#L26-L35\r\n\r\nAnd here is the result of this invokation: https://github.com/kdeldycke/awesome-iam/actions/runs/7592900227/job/20682781487#step:3:13\r\n\r\n**Expected behavior:**\r\nI expect `setup-python` not to fail in the absence of a `**/requirements.txt` or `**/pyproject.toml` file.\r\n\r\n**Actual behavior:**\r\nThe step fails with the following message:\r\n\r\n```\r\nRun actions/setup-python@v5.0.0\r\n with:\r\n python-version: 3.12\r\n cache: pip\r\nInstalled versions\r\n Successfully set up CPython (3.12.1)\r\nError: No file in /home/runner/work/awesome-iam/awesome-iam matched to\r\n[**/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository\r\n```\r\n","author":{"url":"https://github.com/kdeldycke","@type":"Person","name":"kdeldycke"},"datePublished":"2024-01-30T14:24:52Z","url":"https://github.com/actions/setup-python/issues/807"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8dff9b41-2a22-1fab-6789-a68668a895e5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DE4:AA9CB:9F505A:D12431:6B026136 |
| html-safe-nonce | 9f8d17d8df6218b2d8e87917532a3503d3a2eb06a36a7734c253cc7170ec3ef6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REU0OkFBOUNCOjlGNTA1QTpEMTI0MzE6NkIwMjYxMzYiLCJ2aXNpdG9yX2lkIjoiOTIyMTQ3NDc5Njk3NjYyODAyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8bf5cce300b84f91c1ccbd8fd0077b3e49f8a9fcec1639a22791599c79d90f88 |
| hovercard-subject-tag | issue:2107991363 |
| github-keyboard-shortcuts | repository,issues,actions,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/setup-python/807/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d0551129036bfad14b50977bc66e5c1aab99f17b4ce9d5a5e4e25673e7437c23/actions/setup-python/issues/807 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d0551129036bfad14b50977bc66e5c1aab99f17b4ce9d5a5e4e25673e7437c23/actions/setup-python/issues/807 |
| og:image:alt | Description: I am trying to use setup-python in a non Python repository. But I soon as I activate the cache, it ends up with this error: Run actions/setup-python@v5.0.0 with: python-version: 3.12 c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kdeldycke |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/actions/setup-python git https://github.com/actions/setup-python.git |
| octolytics-dimension-user_id | 44036562 |
| octolytics-dimension-user_login | actions |
| octolytics-dimension-repository_id | 192625525 |
| octolytics-dimension-repository_nwo | actions/setup-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 192625525 |
| octolytics-dimension-repository_network_root_nwo | actions/setup-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width