Skip to content

Repository files navigation

destiny-manifest-kv-sync

The meat of this repository is a GitHub Actions workflow that syncs the latest Destiny 2 manifest to a specific Cloudflare Workers KV store.

Keys are written as <TableName>/<hash>, with the full definition JSON as the value — e.g. DestinyStatDefinition/392767087.

When it runs

  • Daily, at 18:00 UTC
  • On push to main
  • On pull request, as a dry run (downloads, never uploads)
  • Manually via workflow_dispatch, with an optional force input

Only changed manifests are uploaded

Every key/value pair written to KV is a billed write, and a full sync is ~170k of them. Re-uploading an unchanged manifest costs real money and achieves nothing.

So the sync records the version it last uploaded in KV itself:

_meta/manifestVersion  →  "<manifest version string>"

On every run the script fetches the manifest header, compares versions, and exits before downloading any tables if they match. Since Destiny has shipped its final patch, that is now the overwhelmingly common case.

The version key is written last, and only after a successful upload, so a partial sync is retried on the next run rather than recorded as complete.

To force a re-upload — say, after a namespace is known to be half-written — run the workflow manually with force checked.

Required secrets

Secret Notes
BUNGIE_API_KEY
SERVER_URL sent as the Origin header to Bungie
CLOUDFLARE_ACCOUNT_ID
CLOUDFLARE_NAMESPACE_ID the target KV namespace
CLOUDFLARE_API_TOKEN needs read and write on Workers KV — reads are used for the version check

About

A GitHub action that syncs the Destiny manifest to Cloudflare Worker KV

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages