{"id":21697879,"url":"https://github.com/yakubique/upsert-postgresql","last_synced_at":"2026-04-07T07:47:48.223Z","repository":{"id":224918347,"uuid":"764596299","full_name":"yakubique/upsert-postgresql","owner":"yakubique","description":"Upsert anything to PostgreSQL","archived":false,"fork":false,"pushed_at":"2024-03-22T11:44:59.000Z","size":235,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-03T00:44:24.031Z","etag":null,"topics":["github-actions","insert","postgresql","sql","update","upsert"],"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/yakubique.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"ko_fi":"opa_oz"}},"created_at":"2024-02-28T11:16:37.000Z","updated_at":"2024-02-28T11:17:51.000Z","dependencies_parsed_at":"2024-02-28T12:20:14.386Z","dependency_job_id":"b81985b8-a46f-461a-a143-3f9bd1a7f6bf","html_url":"https://github.com/yakubique/upsert-postgresql","commit_stats":null,"previous_names":["yakubique/upsert-postgresql"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/yakubique/upsert-postgresql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakubique%2Fupsert-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakubique%2Fupsert-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakubique%2Fupsert-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakubique%2Fupsert-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yakubique","download_url":"https://codeload.github.com/yakubique/upsert-postgresql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakubique%2Fupsert-postgresql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31504897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["github-actions","insert","postgresql","sql","update","upsert"],"created_at":"2024-11-25T19:29:55.919Z","updated_at":"2026-04-07T07:47:48.201Z","avatar_url":"https://github.com/yakubique.png","language":"TypeScript","funding_links":["https://ko-fi.com/opa_oz","https://ko-fi.com/S6S1UZ9P7"],"categories":[],"sub_categories":[],"readme":"# Upsert to PostgreSQL\n\n[![Coverage](./badges/coverage.svg)](./badges/coverage.svg)\n[![Test `upsert-postgresql` action](https://github.com/yakubique/upsert-postgresql/actions/workflows/test-myself.yaml/badge.svg)](https://github.com/yakubique/upsert-postgresql/actions/workflows/test-myself.yaml)\n\n\nUpsert anything to PostgreSQL\n\n\n[Usage workflow](https://github.com/yakubique/upsert-postgresql/actions/workflows/test-myself.yaml)\n\nInsert or update provided JSON array (_or file with JSON array_) to database. Conflicts would be resolved\nby `column_to_match`\n\n## Usage\n\n```yaml\n- name: Upsert\n  id: upsert\n  uses: yakubique/upsert-postgresql@v1.3\n  with:\n    input: |\n      [{ \"id\": 1, \"value\": \"c\", \"test\": 1 }, { \"id\": 2, \"value\": \"b\", \"test\": 2 }]\n    host: ${{ env.PG_HOST }}\n    port: ${{ env.PG_PORT }}\n    username: ${{ env.PG_USER }}\n    password: ${{ env.PG_PWD }}\n    db: ${{ env.PG_DB }}\n    ssl: 'false'\n    column_to_match: 'id'\n    table_name: 'test'\n```\n\n## Inputs\n\n\u003c!-- AUTO-DOC-INPUT:START - Do not remove or modify this section --\u003e\n\n|      INPUT      |  TYPE  | REQUIRED |  DEFAULT   |                                      DESCRIPTION                                      |\n|-----------------|--------|----------|------------|---------------------------------------------------------------------------------------|\n|      input      | string |   true   |            |                                    Input JSON/file                                    |\n|       db        | string |   true   |            |                                     PostgreSQL db                                     |\n|      host       | string |   true   |            |                                    PostgreSQL host                                    |\n|    password     | string |   true   |            |                                  PostgreSQL password                                  |\n|    username     | string |   true   |            |                                  PostgreSQL username                                  |\n|      port       | string |   true   |  `\"5432\"`  |                            PostgreSQL port (default: 5432)                            |\n|   table_name    | string |   true   |            |                                Name of table to upsert                                |\n| column_to_match | string |   true   |            | Primary column to match records (possible to pass multiple columns, comma separated)  |\n|  table_schema   | string |  false   | `\"public\"` |                      Table schema to upsert (default: 'public')                       |\n|       ssl       | string |  false   |  `\"true\"`  |                             SSL enabled (default: 'true')                             |\n|     to_file     | string |  false   | `\"false\"`  |                        Save result to file (default: 'false')                         |\n|    from_file    | string |  false   | `\"false\"`  |                        Read query from file (default: 'false')                        |\n\n\u003c!-- AUTO-DOC-INPUT:END --\u003e\n\n## Outputs\n\n\u003c!-- AUTO-DOC-OUTPUT:START - Do not remove or modify this section --\u003e\n\n| OUTPUT |  TYPE  |     DESCRIPTION     |\n|--------|--------|---------------------|\n| count  | string | Upserted rows count |\n\n\u003c!-- AUTO-DOC-OUTPUT:END --\u003e\n\n----\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/S6S1UZ9P7)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakubique%2Fupsert-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyakubique%2Fupsert-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakubique%2Fupsert-postgresql/lists"}