{"id":15934606,"url":"https://github.com/keinos/gh-action-hash-for-cache","last_synced_at":"2025-09-09T18:05:43.141Z","repository":{"id":37861786,"uuid":"450335475","full_name":"KEINOS/gh-action-hash-for-cache","owner":"KEINOS","description":"GitHub Action of enhanced hashFiles for all runners (Windows, macOS and Linux.)","archived":false,"fork":false,"pushed_at":"2025-08-15T12:47:02.000Z","size":29,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-15T14:50:13.643Z","etag":null,"topics":["actions","github-action","github-actions","hashfile"],"latest_commit_sha":null,"homepage":"","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/KEINOS.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}},"created_at":"2022-01-21T03:08:14.000Z","updated_at":"2025-08-15T12:47:04.000Z","dependencies_parsed_at":"2024-11-16T15:04:46.690Z","dependency_job_id":null,"html_url":"https://github.com/KEINOS/gh-action-hash-for-cache","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.1333333333333333,"last_synced_commit":"300da1259bb09b81893e699d7d7f4e948d57d7f4"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/KEINOS/gh-action-hash-for-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KEINOS%2Fgh-action-hash-for-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KEINOS%2Fgh-action-hash-for-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KEINOS%2Fgh-action-hash-for-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KEINOS%2Fgh-action-hash-for-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KEINOS","download_url":"https://codeload.github.com/KEINOS/gh-action-hash-for-cache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KEINOS%2Fgh-action-hash-for-cache/sbom","scorecard":{"id":76324,"data":{"date":"2025-08-11","repo":{"name":"github.com/KEINOS/gh-action-hash-for-cache","commit":"300da1259bb09b81893e699d7d7f4e948d57d7f4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/basic_func_test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/KEINOS/gh-action-hash-for-cache/basic_func_test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/basic_func_test.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/KEINOS/gh-action-hash-for-cache/basic_func_test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/basic_func_test.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/KEINOS/gh-action-hash-for-cache/basic_func_test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/basic_func_test.yml:76: update your workflow using https://app.stepsecurity.io/secureworkflow/KEINOS/gh-action-hash-for-cache/basic_func_test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/basic_func_test.yml:103: update your workflow using https://app.stepsecurity.io/secureworkflow/KEINOS/gh-action-hash-for-cache/basic_func_test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/platform_test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/KEINOS/gh-action-hash-for-cache/platform_test.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/basic_func_test.yml:1","Warn: no topLevel permission defined: .github/workflows/platform_test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T04:55:12.958Z","repository_id":37861786,"created_at":"2025-08-15T04:55:12.958Z","updated_at":"2025-08-15T04:55:12.958Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274339939,"owners_count":25267290,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"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":["actions","github-action","github-actions","hashfile"],"created_at":"2024-10-07T03:20:19.576Z","updated_at":"2025-09-09T18:05:43.089Z","avatar_url":"https://github.com/KEINOS.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Test](https://github.com/KEINOS/gh-action-hash-for-cache/actions/workflows/basic_func_test.yml/badge.svg)](https://github.com/KEINOS/gh-action-hash-for-cache/actions/workflows/basic_func_test.yml)\n[![linux-mac-win](https://github.com/KEINOS/gh-action-hash-for-cache/actions/workflows/platform_test.yml/badge.svg)](https://github.com/KEINOS/gh-action-hash-for-cache/actions/workflows/platform_test.yml)\n\n# Unique Key (file hash) Generator for Caching\n\nThis GitHub Action generates a unique key (file hash) from one or more files for caching.\n\nIt **works on Linux, macOS, and Windows runners**.\n\n```yaml\n- uses: KEINOS/gh-action-hash-for-cache@main\n  id: \u003cID to call the hash from other steps\u003e\n  with:\n    path: |\n      \u003cpath to target file1\u003e\n      \u003cpath to target file2\u003e\n    variant: \u003ca string\u003e\n```\n\n- `path`: A list of files that will be hashed.\n- `variant`: A string to be hashed. (Optional)\n- Exposed variable: `hash`\n  - To obtain the hash value: `steps.\u003cid\u003e.outputs.hash`\n- Detailed examples follows.\n\n## About\n\n[This GitHub Action](https://github.com/KEINOS/gh-action-hash-for-cache):\n\n- **Simply generates a hash of the given entry**.\n  - If the content of the entry is changed, a different hash will be obtained.\n  - Useful to generate a unique key or ID for caching.\n- Works on Linux, macOS, and Windows runners.\n- Aims to be a helper action for \"[actions/cache@v2](https://github.com/marketplace/actions/cache)\".\n- It is also possible to specify a time-limited hash.\n- Help us to fix [issues](https://github.com/KEINOS/gh-action-hash-for-cache/issues) @ GitHub.\n- View on [marketplace](https://github.com/marketplace/actions/file-hash-for-cache).\n\n## Usage\n\nBasic format of the workflow step.\n\n```yaml\njobs:\n  \u003cjob_name\u003e:\n\n    strategy:\n      matrix:\n        platform: [ubuntu-latest, macos-latest, windows-latest]\n\n    runs-on: ${{ matrix.platform }}\n\n    steps:\n      - name: \u003cname of the step to display\u003e\n        uses: KEINOS/gh-action-hash-for-cache@main\n        id: \u003cID to call the hash from other steps\u003e\n        with:\n          path: |\n            \u003cpath to target file1\u003e\n            \u003cpath to target file2\u003e\n          variant: \u003ca string\u003e\n```\n\n- Exposed variables: `steps.\u003cid\u003e.outputs.hash`\n\n## Examples\n\n### On File Change\n\nIn this example, if \"Dockerfile\" is changed, the hash will be changed.\n\n```yaml\n- name: Get a hash key from a file\n  id: hash-now-dont-you-cry\n  uses: KEINOS/gh-action-hash-for-cache@main\n  with:\n    path: ./Dockerfile\n\n- name: Activate caching\n  id: cache\n  uses: actions/cache@v3\n  with:\n    path: /path/target/dir/to/cache/and/restore\n    key: ${{ steps.hash-now-dont-you-cry.outputs.hash }}\n```\n\nMultiple target files can be specified. The below example, if \"composer.json\" or \"composer.lock\" is changed, the hash will be changed.\n\n```yaml\n- name: Get a hash key from two files\n  id: hash-now-dont-you-cry\n  uses: KEINOS/gh-action-hash-for-cache@main\n  with:\n    path: |\n      ./composer.json\n      ./composer.lock\n\n- name: Activate caching\n  id: cache\n  uses: actions/cache@v3\n  with:\n    path: /path/target/dir/to/cache/and/restore\n    key: ${{ steps.hash-now-dont-you-cry.outputs.hash }}\n```\n\n### On Variant Change\n\nIn this example, if \"go.mod\" or \"go.sum\" is modified **or the value of \"variant\" is changed**, the hash will be changed.\n\n```yaml\n- name: Get hash key\n  id: hash-now-dont-you-cry\n  uses: KEINOS/gh-action-hash-for-cache@main\n  with:\n    path: |\n      ./go.mod\n      ./go.sum\n    variant: \"v1.0.0\"\n\n- name: Activate caching\n  id: cache\n  uses: actions/cache@v3\n  with:\n    path: /path/target/dir/to/cache/and/restore\n    key: ${{ steps.hash-now-dont-you-cry.outputs.hash }}\n```\n\n### Time-limitation using variant\n\nIn this example, if \"go.mod\" or \"go.sum\" is modified **or the month is changed**, the hash will be changed.\n\n- Note that the \"TZ\" (time zone) can be changed to suit your country.\n\n```yaml\n- name: Get hash key\n  id: hash-now-dont-you-cry\n  uses: KEINOS/gh-action-hash-for-cache@main\n  with:\n    path: |\n      ./go.mod\n      ./go.sum\n    variant: $(TZ=UTC-9 date '+%Y%m')\n\n- name: Activate caching\n  id: cache\n  uses: actions/cache@v3\n  with:\n    path: /path/target/dir/to/cache/and/restore\n    key: ${{ steps.hash-now-dont-you-cry.outputs.hash }}\n```\n\n### View working example\n\n- [workflows/unit-tests.yml](https://github.com/KEINOS/go-argonize/blob/main/.github/workflows/unit-tests.yml) @ [github.com/KEINOS/go-argonize](https://github.com/KEINOS/go-argonize)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeinos%2Fgh-action-hash-for-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeinos%2Fgh-action-hash-for-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeinos%2Fgh-action-hash-for-cache/lists"}