{"id":22693718,"url":"https://github.com/mooyoul/dynamodb-actions","last_synced_at":"2025-04-13T00:15:49.555Z","repository":{"id":37030466,"uuid":"260577324","full_name":"mooyoul/dynamodb-actions","owner":"mooyoul","description":"Integrate Github Action with Amazon DynamoDB","archived":false,"fork":false,"pushed_at":"2025-04-01T09:54:33.000Z","size":1084,"stargazers_count":14,"open_issues_count":15,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T00:15:44.409Z","etag":null,"topics":["aws","aws-dynamodb","dynamodb","github-action","github-actions"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/mooyoul.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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":"2020-05-01T23:21:57.000Z","updated_at":"2024-06-03T08:21:46.000Z","dependencies_parsed_at":"2024-05-04T21:28:12.851Z","dependency_job_id":"b0c616c5-9594-4b03-8832-9c6903361ec6","html_url":"https://github.com/mooyoul/dynamodb-actions","commit_stats":{"total_commits":279,"total_committers":5,"mean_commits":55.8,"dds":"0.20788530465949817","last_synced_commit":"870f2947cbc8ed94e826d119654c3467a6bb709f"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mooyoul%2Fdynamodb-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mooyoul%2Fdynamodb-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mooyoul%2Fdynamodb-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mooyoul%2Fdynamodb-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mooyoul","download_url":"https://codeload.github.com/mooyoul/dynamodb-actions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647273,"owners_count":21139086,"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":["aws","aws-dynamodb","dynamodb","github-action","github-actions"],"created_at":"2024-12-10T02:12:59.931Z","updated_at":"2025-04-13T00:15:49.535Z","avatar_url":"https://github.com/mooyoul.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dynamodb-actions\n\n[![Build Status](https://github.com/mooyoul/dynamodb-actions/workflows/workflow/badge.svg)](https://github.com/mooyoul/dynamodb-actions/actions)\n[![Example Status](https://github.com/mooyoul/dynamodb-actions/workflows/example/badge.svg)](https://github.com/mooyoul/dynamodb-actions/actions)\n[![Semantic Release enabled](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)\n[![MIT license](http://img.shields.io/badge/license-MIT-blue.svg)](http://mooyoul.mit-license.org/)\n\nGitHub action that integrates with Amazon DynamoDB.\n\nInspired from [DynamoDB integration in AWS Step Functions](https://docs.aws.amazon.com/step-functions/latest/dg/connect-ddb.html)\n\n-----\n\n![Example](./assets/example.png)\n\n## Supported Operations\n\n### Get Item\n\nGet Item from DynamoDB and Returns JSON-serialized Item payload.\n\n##### Example\n\n```yaml\n# ...\njobs:\n  job:\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n    steps:\n      - name: Get DynamoDB Item\n        id: config\n        uses: mooyoul/dynamodb-actions@v1.2.1\n        env:\n          AWS_DEFAULT_REGION: us-east-1\n          AWS_REGION: us-east-1\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        with:\n          operation: get\n          region: us-east-1\n          table: my-awesome-config\n          key: |\n            { key: \"foo\" }\n      - name: Print item\n        run: |\n          echo '${{ steps.config.outputs.item }}'\n      - name: Print specific field using built-in function\n        run: |\n          echo '${{ fromJson(steps.config.outputs.item).commit }}'\n      - name: Print specific field using jq\n        run: |\n          jq '.commit' \u003c\u003c\u003c '${{ steps.config.outputs.item }}'\n```\n\n\n##### Input\n\n```typescript\ntype GetItemInput = {\n  operation: \"get\";\n  region: string;\n  table: string;\n  key: string; // JSON-serialized key\n  consistent?: boolean;\n}\n```\n\n##### Output\n\nJSON-serialized item will be set to `item` output.\n\n### Put Item\n\nPut Item to DynamoDB\n\n##### Example\n\nwith JSON input:\n\n```yaml\n# ...\njobs:\n  job:\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v2\n      - name: Put DynamoDB Item\n        uses: mooyoul/dynamodb-actions@v1.2.1\n        env:\n          AWS_DEFAULT_REGION: us-east-1\n          AWS_REGION: us-east-1\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        with:\n          operation: put\n          region: us-east-1\n          table: my-awesome-config\n          item: |\n            { \n              key: \"foo\",\n              value: \"wow\",\n              awesome: true,\n              stars: 12345\n            }\n```\n\nwith File input:\n\n\n```yaml\n# ...\njobs:\n  job:\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v2\n      - name: Put DynamoDB Item\n        uses: mooyoul/dynamodb-actions@v1.2.1\n        env:\n          AWS_DEFAULT_REGION: us-east-1\n          AWS_REGION: us-east-1\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        with:\n          operation: put\n          region: us-east-1\n          table: my-awesome-config\n          file: somewhere/filename.json\n```\n\n\n##### Input\n\n```typescript\ntype PutItemInput = {\n  operation: \"put\";\n  region: string;\n  table: string;\n  item: string; // JSON-serialized item\n} | {\n  operation: \"put\";\n  region: string;\n  table: string;\n  file: string; // JSON file path\n};\n```\n\n##### Output\n\nNone.\n\n\n### Batch Put Item\n\nBatch Put Item to DynamoDB.\n\n##### Example\n\nwith JSON input:\n\n```yaml\n# ...\njobs:\n  job:\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v2\n      - name: Put DynamoDB Item\n        uses: mooyoul/dynamodb-actions@v1.2.1\n        env:\n          AWS_DEFAULT_REGION: us-east-1\n          AWS_REGION: us-east-1\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        with:\n          operation: batch-put\n          region: us-east-1\n          table: my-awesome-config\n          items: |\n            [{ \n              key: \"foo\",\n              value: \"wow\",\n              awesome: true,\n              stars: 12345\n            }, {\n              key: \"bar\",\n              value: \"such\",\n              awesome: false,\n              stars: 1\n            }]\n```\n\nwith File input (Glob):\n\n\u003e You can select multiple files by supplying Glob.\n\u003e\n\u003e For supported Glob patterns, Please refer to [@actions/glob README](https://github.com/actions/toolkit/tree/master/packages/glob#patterns).\n  \n\n```yaml\n# ...\njobs:\n  job:\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v2\n      - name: Put DynamoDB Item\n        uses: mooyoul/dynamodb-actions@v1.2.1\n        env:\n          AWS_DEFAULT_REGION: us-east-1\n          AWS_REGION: us-east-1\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        with:\n          operation: batch-put\n          region: us-east-1\n          table: my-awesome-config\n          files: somewhere/prefix*.json\n```\n\n\n##### Input\n\n```typescript\ntype BatchPutItemInput = {\n  operation: \"batch-put\";\n  region: string;\n  table: string;\n  items: string; // JSON-serialized item array\n} | {\n  operation: \"put\";\n  region: string;\n  table: string;\n  files: string; // Glob to match JSON file paths\n};\n```\n\n##### Output\n\nNone.\n\n\n### Delete Item\n\nDelete Item from DynamoDB\n\n##### Example\n\n```yaml\n# ...\njobs:\n  job:\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n    steps:\n      - name: Delete DynamoDB Item\n        uses: mooyoul/dynamodb-actions@v1.2.1\n        env:\n          AWS_DEFAULT_REGION: us-east-1\n          AWS_REGION: us-east-1\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        with:\n          operation: delete\n          region: us-east-1\n          table: my-awesome-config\n          key: |\n            { key: \"foo\" }\n```\n\n##### Input\n\n```typescript\ntype DeleteItemInput = {\n  operation: \"delete\";\n  region: string;\n  table: string;\n  key: string; // JSON-serialized key\n}\n```\n\n##### Output\n\nNone\n\n## FAQ\n\n#### How to select specific field?\n\nUse Github Actions built-in `fromJson` function.\n\nFor example:\n```yaml\n- name: Print specific field\n  run: |\n    echo '${{ fromJson(steps.[id].outputs.item).[field] }}'\n```\n\nAlternatively, You can also use [jq](https://stedolan.github.io/jq/). [Github-hosted runners already have pre-installed jq.](https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners)\n\nFor example:\n```yaml\n- name: Print specific field\n  run: |\n    jq '.field' \u003c\u003c\u003c echo '${{ steps.[id].outputs.item }}'\n``` \n\n## Wishlist\n\n- Add UpdateItem operation\n- Add conditional writes (e.g. putItem / updateItem)\n\n## License\n\n[MIT](LICENSE)\n\nSee full license on [mooyoul.mit-license.org](http://mooyoul.mit-license.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmooyoul%2Fdynamodb-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmooyoul%2Fdynamodb-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmooyoul%2Fdynamodb-actions/lists"}