{"id":16329603,"url":"https://github.com/namoscato/action-tinify","last_synced_at":"2025-06-15T17:39:36.239Z","repository":{"id":39105849,"uuid":"267984588","full_name":"namoscato/action-tinify","owner":"namoscato","description":"GitHub Action to compress and resize images with the Tinify API","archived":false,"fork":false,"pushed_at":"2023-12-10T17:57:29.000Z","size":2477,"stargazers_count":39,"open_issues_count":13,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T10:17:13.296Z","etag":null,"topics":["compression","github-actions","image","optimization","tinify","tinyjpg","tinypng"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/tinify-image-action","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/namoscato.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-30T01:01:02.000Z","updated_at":"2025-01-29T16:44:42.000Z","dependencies_parsed_at":"2024-06-21T07:28:26.709Z","dependency_job_id":"ca04991a-1d08-42b8-a8a3-e4e7f6e49469","html_url":"https://github.com/namoscato/action-tinify","commit_stats":{"total_commits":218,"total_committers":3,"mean_commits":72.66666666666667,"dds":0.3027522935779816,"last_synced_commit":"dffa7ebd7f5ff069c4a603960acb7c1339914c5d"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namoscato%2Faction-tinify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namoscato%2Faction-tinify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namoscato%2Faction-tinify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namoscato%2Faction-tinify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/namoscato","download_url":"https://codeload.github.com/namoscato/action-tinify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244704051,"owners_count":20496232,"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":["compression","github-actions","image","optimization","tinify","tinyjpg","tinypng"],"created_at":"2024-10-10T23:16:17.039Z","updated_at":"2025-03-20T22:32:06.035Z","avatar_url":"https://github.com/namoscato.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"[![ci](https://github.com/namoscato/action-tinify/actions/workflows/ci.yml/badge.svg)](https://github.com/namoscato/action-tinify/actions/workflows/ci.yml) [![docker](https://img.shields.io/docker/v/namoscato/github-action-tinify?label=docker\u0026logoColor=%23fff\u0026sort=semver)](https://hub.docker.com/r/namoscato/github-action-tinify)\n\n# Tinify Image Action\n\n[GitHub Action](https://github.com/features/actions) to compress and resize images with the [Tinify API](https://tinypng.com/developers).\n\n![Example commit](https://i.imgur.com/FWOosON.png)\n\n## Features\n\n- filters PNG, JPEG, and WebP files in a commit or pull request\n- optionally scales images proportionally\n- sets Exif metadata to prevent duplicate compressions\n- pushes commit with compression metrics\n\n## Usage\n\nFor example, on [`pull_request` events](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths) with modified files inside the `static` directory:\n\n```yaml\nname: Compress Images\n\non:\n  pull_request:\n    paths:\n      - 'static/**'\n\njobs:\n  compress:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          ref: ${{ github.head_ref }}\n      - uses: namoscato/action-tinify@v1\n        with:\n          api_key: ${{ secrets.TINIFY_API_KEY }}\n```\n\n### Events\n\nThe following [webhook events](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#webhook-events) are supported:\n\n- `pull_request`\n- `push`\n\n\u003e [!IMPORTANT]  \n\u003e In pull request contexts, [`actions/checkout`](https://github.com/actions/checkout) checkouts a _merge_ commit by default. You must checkout the pull request _HEAD_ commit by overriding the `ref` input as illustrated above and as noted in [their documentation](https://github.com/actions/checkout#Checkout-pull-request-HEAD-commit-instead-of-merge-commit).\n\n### Commit Behavior\n\nEvents triggered by a default `GITHUB_TOKEN` commit [will **not** create a new workflow run](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow) to prevent accidental recursion.\n\nIf you are sure that you want the compression commit to trigger a workflow run, you can configure [`actions/checkout`](https://github.com/actions/checkout) with a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens):\n\n```yaml\n- uses: actions/checkout@v4\n  with:\n    ref: ${{ github.head_ref }}\n    token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n```\n\n### Inputs\n\n| input               | description                                                                                                                                                                |\n| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`api_key`**       | Required Tinify API key (create one [here](https://tinypng.com/developers))                                                                                                |\n| `github_token`      | Repository `GITHUB_TOKEN` or personal access token secret; defaults to [`github.token`](https://docs.github.com/en/actions/security-guides/automatic-token-authentication) |\n| `commit_user_name`  | Git user.name, defaults to `github.actor`                                                                                                                                  |\n| `commit_user_email` | Git user.email, defaults to `\u003cgithub.actor\u003e@users.noreply.github.com`                                                                                                      |\n| `commit_message`    | Custom commit message, defaults to `Compress image(s)`                                                                                                                     |\n| `resize_width`      | Maximum target image width                                                                                                                                                 |\n| `resize_height`     | Maximum target image height                                                                                                                                                |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamoscato%2Faction-tinify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamoscato%2Faction-tinify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamoscato%2Faction-tinify/lists"}