Comments (12)
You're referencing master which is the coding branch. You should reference a distribution branch. The distribution branch contains a fully self contained set of code.
https://github.com/actions/toolkit/blob/master/docs/action-versioning.md
This template and walkthrough has you checking in production dependencies.
The runner downloads the files at the location and ref and runs it. That's it.
In the example above ^^ you're referencing master which is the coding branch and doesn't have production runtime dependencies.
npm install is a dev build time action. distributions are self contained.
covered in readme walthrough: https://github.com/actions/javascript-action#publish-to-a-distribution-branch
from javascript-action.
Another solution to not push node_modules into git is to use a bundler like webpack, parcel, etc
from javascript-action.
Ok, thanks I was able to reporduce:
https://github.com/wesleytodd/actions-testing/commit/7b6d9d97d9298bf57b07bdaab2f2c0956d11e85b/checks
from javascript-action.
I will write up a public document soon on the toolkit repo with the GPR proposal which we will start soon ...
from javascript-action.
just ran into the same thing and agree that this should be handled by the platform :)
from javascript-action.
https://github.com/wesleytodd/actions-testing/commit/73159469ab560d08f64e59a61fbe64d65764057a/checks
I used the template, and then pushed a commit, the action ran fine. Can you all who are seeing this issue provide more context?
from javascript-action.
https://github.com/wesleytodd/actions-testing/commit/73159469ab560d08f64e59a61fbe64d65764057a/checks
I used the template, and then pushed a commit, the action ran fine. Can you all who are seeing this issue provide more context?
Since your action is in the same repo as the workflow, you can run npm ci
on your action. This approach isn't applicable for published public actions.
from javascript-action.
Another solution to not push node_modules into git is to use a bundler like webpack, parcel, etc
The same problem, if i'll use a bundler, i'll have to publish the bundled code to the repo.
from javascript-action.
https://github.com/wesleytodd/actions-testing/commit/e0ca2a86035790823447e1288f722c1908b762e5/checks
This run was against this template. And it also worked.
from javascript-action.
https://github.com/wesleytodd/actions-testing/commit/e0ca2a86035790823447e1288f722c1908b762e5/checks
This run was against this template. And it also worked.
You as a user of an action can run npm ci
to make it work. But as a publisher of an action, you can't run npm ci
on your action because of syntax limitations, so you have to rely on the user to run it for you, which isn't the best UX...
from javascript-action.
The requirement is to be able to reference the distribution to run by an immutable reference (sha) or ref.
We have an enhancement that we're targetting hopefully for later this year where a workflow can reference from GPR (packaging)
from javascript-action.
Until we get to GPR, we found a better mitigated solution. #5
from javascript-action.
Related Issues (20)
- action.yml - update runs.using to node14 or node16? HOT 1
- олго
- Where can I find information about handling canceled jobs with pre-exit/cancel hooks?
- `npm install` has error HOT 2
- Look for maintainers? HOT 2
- Superseded by
- JR3
- JR3
- Rename default branch
- check-dist.yml fails consistently HOT 4
- Test comment headers outdated? HOT 1
- I HOT 6
- HBI
- ISO 7
- Key git'md:showhanor Rahman[⟨<->⟩]\/I'()_/`/`Saw id3key"·;]-,_,-]}_{esquire HOT 1
- Add development containers for GitHub Codespaces HOT 1
- Codespaces not working HOT 1
- Issue with linting when executed on push HOT 4
- JavaScript
- use vercel instead zeit for module compiling. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javascript-action.