{"id":21519620,"url":"https://github.com/usefulness/diffuse-action","last_synced_at":"2025-07-12T03:37:44.414Z","repository":{"id":37935446,"uuid":"294059629","full_name":"usefulness/diffuse-action","owner":"usefulness","description":"Github Action wrapper for the Jake Wharton's Diffuse library","archived":false,"fork":false,"pushed_at":"2025-04-06T14:05:32.000Z","size":272,"stargazers_count":18,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T22:09:48.326Z","etag":null,"topics":["aab","aar","apk","continuous-integration","diff","diffuse","github-action","jar","pull-requests","wharton"],"latest_commit_sha":null,"homepage":"","language":"Python","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/usefulness.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-09-09T09:04:00.000Z","updated_at":"2025-04-06T14:05:35.000Z","dependencies_parsed_at":"2023-01-11T17:21:25.826Z","dependency_job_id":"25b2db3b-c3bc-478c-a81d-369c9c51cd4b","html_url":"https://github.com/usefulness/diffuse-action","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usefulness%2Fdiffuse-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usefulness%2Fdiffuse-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usefulness%2Fdiffuse-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usefulness%2Fdiffuse-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usefulness","download_url":"https://codeload.github.com/usefulness/diffuse-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119294,"owners_count":21050755,"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":["aab","aar","apk","continuous-integration","diff","diffuse","github-action","jar","pull-requests","wharton"],"created_at":"2024-11-24T00:59:40.765Z","updated_at":"2025-04-09T22:09:55.733Z","avatar_url":"https://github.com/usefulness.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Diffuse - Github Action\n![.github/workflows/after_merge.yml](https://github.com/usefulness/diffuse_action/workflows/.github/workflows/after_merge.yml/badge.svg)\n\nSimple Github Action wrapper for Jake Wharton's [Diffuse](https://github.com/JakeWharton/diffuse) tool.\n\n## Usage\nThe action only exposes _output_ containing the diff, so to effectively consume its output it is highly recommended to use other Github Actions to customize your experience.\n\n### Configuration:\nBy default, this action uses Diffuse fork - https://github.com/usefulness/diffuse (due to: https://github.com/JakeWharton/diffuse/issues/111)\n```\n  - id: diffuse\n    uses: usefulness/diffuse-action@v1\n    with:\n      old-file-path: old/file/path/old_file.apk\n      new-file-path: new/file/path/new_file.apk\n```\n\nYou can override the config to use the original [Diffuse](https://github.com/JakeWharton/diffuse) binary\n```\n  - id: diffuse\n    uses: usefulness/diffuse-action@v1\n    with:\n      old-file-path: old/file/path/old_file.apk\n      new-file-path: new/file/path/new_file.apk\n      diffuse-repo: JakeWharton/diffuse\n      lib-version: 0.1.0\n```\n\n##### Parameters\n`old-file-path` - Path to reference file the diff should be generated for  \n`new-file-path` - Path to current file the diff should be generated for  \n`lib-version` _(Optional)_ - Overrides dependency version, by default uses the latest published version  \n`diffuse-repo` _(Optional)_ - Overrides [usefulness/diffuse](https://github.com/usefulness/diffuse) as the default repository containing published release artifacts.   \n\n##### Outputs\nSee full list of [outputs](https://github.com/usefulness/diffuse-action/blob/master/action.yml#L27).  \nFor example: referencing `steps.diffuse.outputs.diff-gh-comment` at a later stage will print Diffuse tool output as a nicely formatted github comment\n\n### Sample: Create Pull Request comment\n\nTODO: explain why to use free `actions/cache` for now and list its limitation.  \nGood introduction to the problem: https://github.com/JakeWharton/dependency-tree-diff/discussions/8#discussioncomment-1535744\n\n1. Integrate with a regular Pull Request workflow:\n\n```yaml\nname: Pull Request workflow\n\non:\n  pull_request:\n\njobs:\n  generate-diff:\n    runs-on: ubuntu-latest\n    \n    steps:\n    - uses: actions/checkout@v2\n    \n    - uses: actions/setup-java@v3\n      with:\n        distribution: 'temurin'\n        java-version: 23\n      \n    - uses: gradle/actions/setup-gradle@v3\n      with:\n        arguments: assemble\n\n    # Generating the diff starts here 👇 \n\n    - uses: actions/cache@v2\n      name: Download base\n      with:\n        path: diffuse-source-file\n        key: diffuse-${{ github.event.pull_request.base.sha }}\n\n    - id: diffuse\n      uses: usefulness/diffuse-action@v1\n      with:\n        old-file-path: diffuse-source-file\n        new-file-path: app/build/outputs/release/app.apk\n\n\n    # Consuming action output starts here 👇\n\n    - uses: peter-evans/find-comment@v1\n      id: find_comment\n      with:\n        issue-number: ${{ github.event.pull_request.number }}\n        body-includes: Diffuse output\n\n    - uses: peter-evans/create-or-update-comment@v1\n      if: ${{ steps.diffuse.outputs.diff-raw != null || steps.find_comment.outputs.comment-id != null }}\n      with:\n        body: |\n          Diffuse output (customize your message here): \n\n          ${{ steps.diffuse.outputs.diff-gh-comment }}\n        edit-mode: replace\n        comment-id: ${{ steps.find_comment.outputs.comment-id }}\n        issue-number: ${{ github.event.pull_request.number }}\n        token: ${{ secrets.GITHUB_TOKEN }}\n\n    - uses: actions/upload-artifact@v2\n      with:\n        name: diffuse-output\n        path: ${{ steps.diffuse.outputs.diff-file }}\n```\n\n2. Integrate with you post-merge flow:\n```yaml\non:\n  push:\n    branches:\n      - master\n      - main\n      - trunk\n      - develop\n      - maine\n      - mane\n  schedule:\n    - cron: '0 3 * * 1,4'\n\njobs:\n  diffuse_cache:\n    runs-on: ubuntu-latest\n    name: Cache artifact for diffuse\n    steps:\n      - uses: actions/checkout@v2\n      \n      - uses: actions/setup-java@v3\n        with:\n          distribution: 'temurin'\n          java-version: 23\n          \n      - uses: gradle/actions/setup-gradle@v3\n        with:\n          arguments: assemble\n\n      # Integration starts here 👇 \n      \n      - uses: actions/cache@v2\n        name: Upload base\n        with:\n          path: diffuse-source-file\n          key: diffuse-${{ github.sha }}\n\n      # Copy your build artifact under `diffuse-source-file` name which will be saved in cache\n      - run: cp /app/build/outputs/debug/sample-apk.apk diffuse-source-file \n        shell: bash\n``` \n\n\n### More examples\n\nSample application as a [pull request comment](https://github.com/mateuszkwiecinski/github_browser/pull/52)  \nCorresponding [workflow](https://github.com/mateuszkwiecinski/github_browser/blob/master/.github/workflows/run_diffuse.yml) file  \n\n![pull_request](/images/pull_request.png)\n\n\n\n\u003cdetails\u003e\u003csummary\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n🙏 Praise 🙏 be 🙏 to 🙏 Wharton 🙏\n\n\u003c/p\u003e\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusefulness%2Fdiffuse-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusefulness%2Fdiffuse-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusefulness%2Fdiffuse-action/lists"}