{"id":50975340,"url":"https://github.com/Parcels-code/pixi-lock","last_synced_at":"2026-07-07T05:00:28.339Z","repository":{"id":332948869,"uuid":"1135633880","full_name":"Parcels-code/pixi-lock","owner":"Parcels-code","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-02T07:55:36.000Z","size":23,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T08:28:10.934Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Parcels-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-16T11:25:21.000Z","updated_at":"2026-04-02T07:52:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Parcels-code/pixi-lock","commit_stats":null,"previous_names":["parcels-code/create-pixi-lock","parcels-code/pixi-lock"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Parcels-code/pixi-lock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Parcels-code%2Fpixi-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Parcels-code%2Fpixi-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Parcels-code%2Fpixi-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Parcels-code%2Fpixi-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Parcels-code","download_url":"https://codeload.github.com/Parcels-code/pixi-lock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Parcels-code%2Fpixi-lock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35215221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-19T07:02:10.881Z","updated_at":"2026-07-07T05:00:28.332Z","avatar_url":"https://github.com/Parcels-code.png","language":null,"funding_links":[],"categories":["Extensions"],"sub_categories":["Example projects"],"readme":"# pixi-lock\n\n\u003e [!NOTE]\n\u003e This repo may be moved to https://github.com/prefix-dev\n\nThis repo provides two GitHub Actions for generating and caching `pixi.lock` files in CI:\n\n- **`create-and-cache`**: Generates a `pixi.lock` file and caches it\n- **`restore`**: Restores the cached `pixi.lock` file in downstream jobs\n\nThis two-action pattern is so that the lockfile can be omitted from the git\nhistory, but still be generated in a performant manner (i.e., regenerated\nand cached with a key that depends on `pixi.toml` and the date -\nthen shared across jobs).\n\n## Usage\n\n```yaml\njobs:\n  cache-pixi-lock:\n    runs-on: ubuntu-slim\n    outputs:\n      cache-key: ${{ steps.pixi-lock.outputs.cache-key }}\n      pixi-version: ${{ steps.pixi-lock.outputs.pixi-version }}\n    steps:\n      - uses: actions/checkout@v4\n      - uses: Parcels-code/pixi-lock/create-and-cache@... # TODO: Copy the hash for the rev you want to install from\n        id: pixi-lock\n        with:\n          pixi-version: ... # TODO: update with your selected pixi version\n      - uses: actions/upload-artifact@v6 # make available as an artifact for local testing\n        with:\n          name: pixi-lock\n          path: pixi.lock\n\n  ci:\n    needs: cache-pixi-lock\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        os: [ubuntu-latest, macos-latest, windows-latest]\n    steps:\n      - uses: actions/checkout@v4\n      - uses: Parcels-code/pixi-lock/restore@ # TODO: Copy the hash for the rev you want to install from (same as above)\n        with:\n          cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}\n      - uses: prefix-dev/setup-pixi@v... # TODO: update with your selected setup-pixi version\n        with:\n          pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}\n      # ... your CI steps\n```\n\n### Inputs \u0026 Outputs\n\n#### `create-and-cache`\n\n| Input          | Description                                             | Required | Default                          |\n| -------------- | ------------------------------------------------------- | -------- | -------------------------------- |\n| `pixi-version` | Version of pixi to use for generating the lock file     | No       | `latest`                         |\n| `hash-files`   | Files to use to generate the hash key for the lock file | No       | `pixi.toml` and `pyproject.toml` |\n\n| Output         | Description                           |\n| -------------- | ------------------------------------- |\n| `pixi-version` | The pixi version used                 |\n| `cache-key`    | The cache key (includes today's date) |\n\n#### `restore`\n\n| Input       | Description                           | Required |\n| ----------- | ------------------------------------- | -------- |\n| `cache-key` | The cache key from `create-and-cache` | Yes      |\n\n\u003e [!NOTE]\n\u003e The cache key includes the current date, so the lock file is regenerated daily.\n\u003e The fallback key (yesterday's date) is calculated automatically to handle edge cases where the restore job runs just after midnight.\n\n## Why not commit the lock file?\n\nCommitting your lock file is considered good practice when working on application code. Providing fixed package versions results in perfect reproducibility of environments between machines, and hence also reproducibility of results.\n\nWhen developing and testing _library_ code, we don't want our environments to stay completely fixed - we want to test against environments covering a wide range of package versions to ensure compatability, including an environment includ the latest available versions of packages.\n\nThe _easiest_ way to test against the latest versions of packages - and avoid the noisy commit history (and additional overhead) of regularly updating a lock file in git - is instead to ignore the lock file and rely on developers and CI to generate their own lock files. This much simpler setup forgoes perfect reprodubility between developer machines, and with CI machines - which may be a worthwhile tradeoff for your project.\n\nSee the following threads for more detailed discussion:\n\n- [prefix.dev Discord: Should you commit the lockfile](https://discord.com/channels/1082332781146800168/1462778624212996209)\n- [Scientific Python Discord: lock files for libraries](https://discord.com/channels/786703927705862175/1450619697224487083)\n- https://github.com/prefix-dev/pixi/issues/5325\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FParcels-code%2Fpixi-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FParcels-code%2Fpixi-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FParcels-code%2Fpixi-lock/lists"}