{"id":18282940,"url":"https://github.com/zentered/cloudflare-kv-action","last_synced_at":"2025-04-05T06:30:49.535Z","repository":{"id":38846323,"uuid":"480499794","full_name":"zentered/cloudflare-kv-action","owner":"zentered","description":"GitHub Action set and get Cloudflare KV values","archived":false,"fork":false,"pushed_at":"2024-06-20T14:26:52.000Z","size":500,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T23:05:58.532Z","etag":null,"topics":["cloudflare-kv","cloudflare-pages","cloudflare-workers"],"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/zentered.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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-04-11T18:18:46.000Z","updated_at":"2025-03-30T00:06:56.000Z","dependencies_parsed_at":"2023-02-08T09:15:34.736Z","dependency_job_id":"db233127-d789-43e2-9146-febc2841db60","html_url":"https://github.com/zentered/cloudflare-kv-action","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.4285714285714286,"last_synced_commit":"4bba0232565b002e6e56a73e8c7eefc1a8765485"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fcloudflare-kv-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fcloudflare-kv-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fcloudflare-kv-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fcloudflare-kv-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zentered","download_url":"https://codeload.github.com/zentered/cloudflare-kv-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299766,"owners_count":20916183,"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":["cloudflare-kv","cloudflare-pages","cloudflare-workers"],"created_at":"2024-11-05T13:06:46.283Z","updated_at":"2025-04-05T06:30:48.726Z","avatar_url":"https://github.com/zentered.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare KV Action\n\n![Test](https://github.com/zentered/cloudflare-kv-action/workflows/Test/badge.svg)\n![Release](https://github.com/zentered/cloudflare-kv-action/workflows/Publish/badge.svg)\n[![semantic-release: conventional](https://img.shields.io/badge/semantic--release-conventional-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\nPut and get values from Cloudflare KV.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [Environment Variables](#environment-variables--secret)\n- [Inputs](#inputs)\n- [Outputs](#outputs)\n\n## Usage\n\n[Copy your \"Global API Key\"](https://dash.cloudflare.com/profile/api-tokens)\n\nCloudflare needs a little time to build the preview, you can check the average\nbuild time in your deployments and add the seconds plus a little to a `sleep`\naction, to wait until the deployment is ready. The action only works on\nbranches, so make sure you exclude the `main` branch from the trigger:\n\n```yaml\non:\n  push:\n    branches:\n      - '**'\n      - '!main'\n```\n\nHere are the steps for an example job:\n\n```yaml\n- run: sleep 30\n- name: cloudflare-kv-action\n  uses: zentered/cloudflare-kv-action@v1.0.0\n  id: cloudflare_kv\n  env:\n    CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}\n    CLOUDFLARE_ACCOUNT_EMAIL: ${{ secrets.CLOUDFLARE_ACCOUNT_EMAIL }}\n    CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}\n  with:\n    namespace_identifier: '123'\n    key_name: 'hello'\n    value: 'world'\n    expiration_ttl: 120\n- name: Value\n  run: echo \"${{ steps.cloudflare_kv.outputs.value }}\"\n```\n\n## Environment Variables / Secret\n\nIn the repository, go to \"Settings\", then \"Secrets\" and add\n\"CLOUDFLARE_API_TOKEN\", the value you can retrieve on your\n[Cloudflare account](https://dash.cloudflare.com/profile/api-tokens). You also\nneed to add:\n\n- `CLOUDFLARE_ACCOUNT_EMAIL` (your login email, optional)\n- `CLOUDFLARE_ACCOUNT_ID` (from the URL:\n  `https://dash.cloudflare.com/123abc....`)\n- `CLOUDFLARE_API_KEY` (from the URL:\n  `https://dash.cloudflare.com/profile/api-tokens`)\n\n## Inputs\n\n| Name                   | Requirement | Description                                                                                                                                                               |\n| ---------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `namespace_identifier` | required    | Cloudflare namespace ID                                                                                                                                                   |\n| `key_name`             | required    | KV key name                                                                                                                                                               |\n| `value`                | optional    | Optional: Use \"value\" to set a key, otherwise it will be retrieved                                                                                                        |\n| `expiration`           | optional    | Optional: expiration                                                                                                                                                      |\n| `expiration_ttl`       | optional    | Optional: If neither expiration nor expiration_ttl is specified, the key-value pair will never expire. If both are set, expiration_ttl is used and expiration is ignored. |\n\n[Cloudflare API Reference](https://api.cloudflare.com/#workers-kv-namespace-write-key-value-pair)\n\n## Outputs\n\n| Name    | Description |\n| ------- | ----------- |\n| `value` | KV value    |\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md).\n\n## License\n\nSee [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentered%2Fcloudflare-kv-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzentered%2Fcloudflare-kv-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentered%2Fcloudflare-kv-action/lists"}