{"id":17923749,"url":"https://github.com/deryeger/yarn-setup-action","last_synced_at":"2025-03-24T02:33:11.339Z","repository":{"id":37049579,"uuid":"400155380","full_name":"DerYeger/yarn-setup-action","owner":"DerYeger","description":"GitHub Action for setting up a Yarn environment. Caches dependencies for reduced execution times.","archived":false,"fork":false,"pushed_at":"2024-03-24T07:02:27.000Z","size":67,"stargazers_count":16,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T16:52:03.407Z","etag":null,"topics":["actions","ci","github-actions","nodejs","yarn"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DerYeger.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-26T12:09:35.000Z","updated_at":"2024-06-09T07:33:36.883Z","dependencies_parsed_at":"2023-02-15T14:16:19.533Z","dependency_job_id":"391a247b-918e-41bc-8e42-b0a2b7077c10","html_url":"https://github.com/DerYeger/yarn-setup-action","commit_stats":{"total_commits":62,"total_committers":5,"mean_commits":12.4,"dds":0.6774193548387097,"last_synced_commit":"0c0ede1eeb18fc3345d08a3aecf11c02cdcf395b"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerYeger%2Fyarn-setup-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerYeger%2Fyarn-setup-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerYeger%2Fyarn-setup-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerYeger%2Fyarn-setup-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DerYeger","download_url":"https://codeload.github.com/DerYeger/yarn-setup-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245198856,"owners_count":20576456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","ci","github-actions","nodejs","yarn"],"created_at":"2024-10-28T20:45:21.654Z","updated_at":"2025-03-24T02:33:11.102Z","avatar_url":"https://github.com/DerYeger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yarn Setup\n\n\u003e GitHub Action for setting up a Yarn environment. Caches dependencies for reduced execution times.\n\n## Features\n\n- 🔽 Performs a **checkout** using [actions/checkout](https://github.com/actions/checkout).\n- ⚒️ Sets up a **Node.js environment** using the specified `node-version` with [actions/setup-node](https://github.com/actions/setup-node).\n- 💽 **Caches** and retrieves `node_modules` for reduced execution time. Based on [actions/cache](https://github.com/actions/cache).\n- ⌛ Runs `yarn install` with the cached `node_modules`.\n\n## Usage\n\n```yml\nsteps:\n  - name: Yarn setup\n    uses: DerYeger/yarn-setup-action@master\n    with:\n      node-version: 16\n```\n\n### Inputs\n\n- `node-version`: The version of Node.js that will be used.\n\n### Outputs\n\n- `cache-hit`: Indicates a cache hit.\n\n### Example\n\nSplitting long jobs into multiple allows for parallel execution and thus faster workflow execution.\nHowever, every job requires its own setup and environment initialization.\nThis Action allows for easy installation of dependencies while maintaining fast execution times thanks to built-in caching.\n\nThe following example workflow demonstrates parallel execution of three jobs (`build`, `lint` and `test`), which run in parallel.\nThey all depend on the `prepare` job, which either validates that dependencies are cached or installs (then caches) them itself.\nThis setup ensures that each of the following jobs has access to Node.js and dependencies with minimal overhead (usually in the order of 3 to 5 seconds, depending on the project and `postinstall` setup).\n\n```yml\nname: CI\n\non: [pull_request, push]\n\njobs:\n  prepare:\n    name: Prepare\n    runs-on: ubuntu-latest\n    steps:\n      - uses: DerYeger/yarn-setup-action@master\n        with:\n          node-version: 16\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n    needs: prepare\n    steps:\n      - uses: DerYeger/yarn-setup-action@master\n        with:\n          node-version: 16\n      - run: yarn build\n  lint:\n    name: Lint\n    runs-on: ubuntu-latest\n    needs: prepare\n    steps:\n      - uses: DerYeger/yarn-setup-action@master\n        with:\n          node-version: 16\n      - run: yarn lint\n  test:\n    name: Test\n    runs-on: ubuntu-latest\n    needs: prepare\n    steps:\n      - uses: DerYeger/yarn-setup-action@master\n        with:\n          node-version: 16\n      - run: yarn test\n```\n\n## License\n\n[MIT](./LICENSE) - Copyright \u0026copy; Jan Müller\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderyeger%2Fyarn-setup-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderyeger%2Fyarn-setup-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderyeger%2Fyarn-setup-action/lists"}