actionlint
actionlint copied to clipboard
🐛 [bug]: Installing "actions-cache" breaks in repos not using npm
trafficstars
🐛 What happened?
We use pnpm. the setup for this action breaks
🔬 How to reproduce?
- Have a repo that installs with pnpm but not npm
- Run the action
- failures
🏗️ Code Sample / Log
No response
🌌 Environment (actionlint action)
2
🌌 Environment (actionlint)
2
🌌 Environment (GitHub Runner OS)
Linux
📷 Screenshots
No response
📈 Expected behavior
The project doesn't run commands that depend on my repo setup outside of actionlint and it successfully installs
📎 Additional context
No response
📜 Code of Conduct
- [X] I agree to follow this project's Code of Conduct.
You can add a dummy package.json inside the github action:
- name: Dummy package.json so actionlint works
run: |
rm package.json
echo '{
"name": "dummy-package",
"version": "1.0.0",
"private": true
}' > package.json
Example full file:
name: Actionlint
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
main:
name: Actionlint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Dummy package.json so actionlint works
run: |
rm package.json
echo '{
"name": "dummy-package",
"version": "1.0.0",
"private": true
}' > package.json
- name: Check GitHub Actions
uses: raven-actions/actionlint@v2
- name: Validate Dependabot Config
uses: marocchino/validate-dependabot@v3