{"id":13688714,"url":"https://github.com/lucacome/docker-image-update-checker","last_synced_at":"2025-04-06T01:09:01.999Z","repository":{"id":65160698,"uuid":"386746156","full_name":"lucacome/docker-image-update-checker","owner":"lucacome","description":"Docker Image Update Checker Action","archived":false,"fork":false,"pushed_at":"2025-04-04T22:47:46.000Z","size":10080,"stargazers_count":40,"open_issues_count":8,"forks_count":15,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T23:26:44.121Z","etag":null,"topics":["docker","github-actions","github-actions-docker"],"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/lucacome.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":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-16T19:40:26.000Z","updated_at":"2025-03-27T17:48:34.000Z","dependencies_parsed_at":"2024-10-11T04:31:28.632Z","dependency_job_id":"440546f3-b442-43f8-a0c9-175eaa04c5a9","html_url":"https://github.com/lucacome/docker-image-update-checker","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacome%2Fdocker-image-update-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacome%2Fdocker-image-update-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacome%2Fdocker-image-update-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacome%2Fdocker-image-update-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucacome","download_url":"https://codeload.github.com/lucacome/docker-image-update-checker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419860,"owners_count":20936012,"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":["docker","github-actions","github-actions-docker"],"created_at":"2024-08-02T15:01:20.844Z","updated_at":"2025-04-06T01:09:01.983Z","avatar_url":"https://github.com/lucacome.png","language":"TypeScript","funding_links":[],"categories":["docker"],"sub_categories":[],"readme":"# Docker Image Update Checker Action\n\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/lucacome/docker-image-update-checker/badge)](https://scorecard.dev/viewer/?uri=github.com/lucacome/docker-image-update-checker)\n[![Test](https://github.com/lucacome/docker-image-update-checker/actions/workflows/test.yml/badge.svg)](https://github.com/lucacome/docker-image-update-checker/actions/workflows/test.yml)\n[![GitHub release badge](https://badgen.net/github/release/lucacome/docker-image-update-checker/stable)](https://github.com/lucacome/docker-image-update-checker/releases/latest)\n[![GitHub license badge](https://badgen.net/github/license/lucacome/docker-image-update-checker)](https://github.com/lucacome/docker-image-update-checker/blob/main/LICENSE)\n[![GitHub Workflows badge](https://badgen.net/runkit/lucacome/lucacome-workflow)](https://github.com/search?q=docker-image-update-checker+path%3A.github%2Fworkflows%2F+language%3AYAML\u0026type=Code)\n\nThis action checks if a Docker image needs to be updated based on the base image it uses (e.g. `FROM nginx:1.21.0`). By default it checks for all platforms, but you can specify the platforms to check.\n\n## Inputs\n\n| Name         | Type   | Description                                                                |\n|--------------|--------|----------------------------------------------------------------------------|\n| `base-image` | String | Base Docker Image. This is the image you have as `FROM` in your Dockerfile |\n| `image`      | String | Your image based on `base-image`                                           |\n| `platforms`  | String | Platforms to check (default `all`), e.g. `linux/amd64,linux/arm64`         |\n\n## Output\n\n| Name             | Type   | Description                                                                           |\n|------------------|--------|---------------------------------------------------------------------------------------|\n| `needs-updating` | String | 'true' or 'false' if the image needs to be updated or not                             |\n| `diff-images`    | String | List of images (platforms) that need to be updated                                    |\n| `diff-json`      | String | JSON output of the images (platforms) that need to be updated with the list of layers |\n\n## Runners\n\nThe action works on `ubuntu` and `windows` runners with or without a `docker/login-action` step. Without a login step, it will perform an anonymous pull of the manifests, except for Docker Hub because the Runners already have a token provided by GitHub (I can't find any documentation on this, but the token is there and it works).\n\nIt also works on `macos` runners, but because `docker` is not installed on the runners, you can't use the `docker/login-action`, so you can only use it with public images and anonymous pulls.\n\n## Authentication\n\nTo authenticate with a Docker registry, you can use the [`docker/login-action`](https://github.com/docker/login-action) in a step before this action.\n\n## Examples\n\n- [Minimal](#minimal)\n- [Single platform](#single-platform)\n- [Multiple platforms](#multiple-platforms)\n\n### Minimal\n\nCheck if the image `user/app:latest`, that has `nginx` as a base image, needs to be updated:\n\n```yaml\nname: Check docker image\n\non:\n  schedule:\n    - cron:  '0 4 * * *'\n\njobs:\n  docker:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check if update available\n        id: check\n        uses: lucacome/docker-image-update-checker@v2.0.0\n        with:\n          base-image: nginx:1.21.0\n          image: user/app:latest\n\n      - name: Check result\n        run: echo \"Needs updating: ${{ steps.check.outputs.needs-updating }}\"\n\n```\n\n### Single platform\n\nCheck if the image `user/app:latest`, that has `nginx` has a base image, needs to be updated and build and push the image if needed:\n\n```yaml\nname: Check docker image\n\non:\n  schedule:\n    - cron:  '0 4 * * *'\n\njobs:\n  docker:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4.2.2\n\n      - name: Check if update available\n        id: check\n        uses: lucacome/docker-image-update-checker@v2.0.0\n        with:\n          base-image: nginx:1.21.0\n          image: user/app:latest\n          platforms: linux/amd64\n\n      - name: Build and push\n        uses: docker/build-push-action@v6.15.0\n        with:\n          context: .\n          push: true\n          tags: user/app:latest\n        if: steps.check.outputs.needs-updating == 'true'\n```\n\n### Multiple platforms\n\nCheck if the image `user/app:latest`, that has `nginx` has a base image, needs to be updated for `linux/amd64` and `linux/arm64`:\n\n```yaml\nname: Check docker image for multiple platforms\n\non:\n  schedule:\n    - cron:  '0 4 * * *'\n\njobs:\n  check:\n    runs-on: ubuntu-latest\n    outputs:\n      needs-updating: ${{ steps.check.outputs.needs-updating }}\n    steps:\n      - name: Login to Docker Registry\n        uses: docker/login-action@v3.4.0\n        with:\n          username: ${{ secrets.DOCKER_USERNAME }}\n          password: ${{ secrets.DOCKER_PASSWORD }}\n\n      - name: Check if update available\n        id: check\n        uses: lucacome/docker-image-update-checker@v2.0.0\n        with:\n          base-image: nginx:1.21.0\n          image: user/app:latest\n          platforms: linux/amd64,linux/arm64 # Use 'all' to check all platforms\n\n  build:\n    needs: check\n    runs-on: ubuntu-latest\n    if: needs.check.outputs.needs-updating == 'true'\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4.2.2\n\n      - name: Setup QEMU\n        uses: docker/setup-qemu-action@v3.6.0\n        with:\n          platforms: arm64\n\n      - name: Docker Buildx\n        uses: docker/setup-buildx-action@v3.10.0\n\n      - name: Build and push\n        uses: docker/build-push-action@v6.15.0\n        with:\n          context: .\n          push: true\n          tags: user/app:latest\n          platforms: linux/amd64,linux/arm64\n```\n\n\u003e **Note**\n\u003e\n\u003e The `platforms` input is optional and defaults to `all`.\n\n## Debugging\n\nIf something is not working as expected, you can enable debug logging to get more information (a lot more information).\nYou can re-run the action with the `Enable debug logging` checkbox checked for a single run or set the `ACTIONS_STEP_DEBUG` secret to `true` in the repository's secrets.\nFor more information on debugging actions, see [Enabling debug logging](https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacome%2Fdocker-image-update-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucacome%2Fdocker-image-update-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacome%2Fdocker-image-update-checker/lists"}