{"id":17069241,"url":"https://github.com/mogeko/latest-version","last_synced_at":"2026-01-19T06:01:17.333Z","repository":{"id":62854992,"uuid":"562818552","full_name":"mogeko/latest-version","owner":"mogeko","description":"A GitHub Action that checks and outputs the latest version of the specified repo.","archived":false,"fork":false,"pushed_at":"2024-08-07T14:28:44.000Z","size":40795,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T23:41:13.467Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mogeko.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":"2022-11-07T10:23:36.000Z","updated_at":"2024-08-07T14:28:52.000Z","dependencies_parsed_at":"2024-12-19T06:40:19.793Z","dependency_job_id":null,"html_url":"https://github.com/mogeko/latest-version","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/mogeko/latest-version","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mogeko%2Flatest-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mogeko%2Flatest-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mogeko%2Flatest-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mogeko%2Flatest-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mogeko","download_url":"https://codeload.github.com/mogeko/latest-version/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mogeko%2Flatest-version/sbom","scorecard":{"id":656463,"data":{"date":"2025-08-11","repo":{"name":"github.com/mogeko/latest-version","commit":"802b4a4c5a1e57323ca5de54230de5f6e62e7baf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/run.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/mogeko/latest-version/run.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/mogeko/latest-version/run.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/mogeko/latest-version/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/mogeko/latest-version/test.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":0,"reason":"28 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-x4c5-c7rf-jjgv","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-c76h-2ccp-4975","Warn: Project is vulnerable to: GHSA-cxrh-j4jr-qwg3","Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3","Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx","Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3","Warn: Project is vulnerable to: GHSA-9crc-q9x8-hgqq","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T14:46:26.632Z","repository_id":62854992,"created_at":"2025-08-21T14:46:26.632Z","updated_at":"2025-08-21T14:46:26.632Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28562229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-10-14T11:16:39.763Z","updated_at":"2026-01-19T06:01:17.314Z","avatar_url":"https://github.com/mogeko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# latest-version\n\n[![Try Run This Action](https://github.com/mogeko/latest-version/actions/workflows/run.yml/badge.svg)](https://github.com/mogeko/latest-version/actions/workflows/run.yml)\n\nA GitHub Action that checks and outputs the latest version of the specified repo.\n\nWe require a GitHub repo name in the format `{owner}/{repo}`. Whenever this script runs, the version information of the target repo (`master`/`main` branch and [Git Tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging)) will be checked and a **version information report** will be generated. At the same time, we will compare it with the existing reports in the [workflows cache](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows) to determine whether the target repo is updated.\n\nBy the way, we will output an output that can be understood by [the `tags` input option](https://github.com/marketplace/actions/docker-metadata-action#tags-input) of the GitHub Action [`docker/metadata-action`](https://github.com/marketplace/actions/docker-metadata-action). It can help you manage your Docker Image tags if you need.\n\n\u003e **Note**\n\u003e\n\u003e We use [`@actions/cache`](https://github.com/actions/toolkit/tree/main/packages/cache) to help us determine whether the target repo has been updated. However, due to the limitations of GitHub Action, **we can only pull reports less than 7 days old** and compare them; that is, **the interval between running this script should be less than 7 days**.\n\n## Input\n\n| Input  | Type   | Required? | Description                        |\n| ------ | ------ | --------- | ---------------------------------- |\n| `repo` | String | Yes       | The repo that needs to be watched. |\n\nThe repo should be formatted like `{owner}/{repo}`. For example, the repo `https://github.com/mogeko/latest-version` should be written as `mogeko/latest-version`.\n\n## Output\n\n### `is_update` output\n\nDetermine whether the target repo is updated based on the results of the check and the previous reports in the cache.\n\nUse with the `if` of GitHub Actions workflows:\n\n```yml\nif: needs.check.outputs.is_update == 'true'\n```\n\n### `stable_ver` output\n\nThe latest stable version of the tracked repo.\n\nIf `.versions.latest` exists, it is always equal to `versions.latest.name`; otherwise, degenerates to `.versions.edge.short_sha`.\n\n### `result` output\n\nVersion information report output in JSON format.\n\nAt the same time, we will also output it as a file to `./.latest-version/index.json`.\n\nIt will look like this:\n\n```json\n{\n  \"repo\": {\n    \"name\": \"mogeko/latest-version\",\n    \"url\": \"https://github.com/mogeko/latest-version\"\n  },\n  \"stable_version\": \"v1.0.1\",\n  \"versions\": {\n    \"latest\": {\n      \"name\": \"v1.0.1\",\n      \"sha\": \"f16f36e0c1786a1bf1603d0c28926dbf41fb956c\",\n      \"short_sha\": \"f16f36e\"\n    },\n    \"edge\": {\n      \"name\": \"master\",\n      \"sha\": \"f16f36e0c1786a1bf1603d0c28926dbf41fb956c\",\n      \"short_sha\": \"f16f36e\"\n    }\n  },\n  \"timestamp\": \"2022-11-09T03:03:17.517Z\"\n}\n```\n\n### `docker_tags` output\n\nAn onput that can be understood by [the `tags` input option](https://github.com/marketplace/actions/docker-metadata-action#tags-input) of the GitHub Action [`docker/metadata-action`](https://github.com/marketplace/actions/docker-metadata-action) based on the version report. Includes `latest`, `edge`, version number, hash value (short) of commit, etc.\n\nAmong them, `latest` and version number correspond to the [Git Tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging) of the target repo, and `edge` corresponds to the `master`/`main` branch of the target repo.\n\nHere is an example of this output:\n\n```txt\ntype=raw,value=v0.2.1,enable=false\ntype=raw,value=148b201,enable=false\ntype=raw,value=latest,enable=false\ntype=raw,value=edge,enable=true\ntype=raw,value=ceb2a31,enable=true\n```\n\nyou can use it like this:\n\n```yml\ntags: |\n  type=schedule,pattern={{date 'YYYYMMDD'}}\n  ${{ needs.check.outputs.docker_tags }}\n```\n\n## Example\n\nHere is a complete example of using this GitHub Action:\n\n```yml\non:\n  schedule:\n    - cron: \"30 0 * * *\" # Triggers the workflow every day at 0:30 UTC\n  workflow_dispatch: # Allow manual trigger workflows\n\njobs:\n  check:\n    name: Check Version\n    runs-on: ubuntu-latest\n    outputs:\n      # output as this job,\n      # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idoutputs\n      is_update: ${{ steps.check_ver.outputs.is_update }}\n      result: ${{ steps.check_ver.outputs.result }}\n      docker_tags: ${{ steps.check_ver.outputs.docker_tags }}\n    steps:\n      - uses: mogeko/latest-version@v1\n        id: check_ver\n        with:\n          repo: mogeko/latest-version\n\n  print: # Just for show the output\n    name: Print the result from check\n    runs-on: ubuntu-latest\n    needs: check\n    steps:\n      - run: |\n          echo '${{ needs.check.outputs.is_update }}'\n          echo '${{ needs.check.outputs.result }}' | jq '.'\n          echo '${{ needs.check.outputs.docker_tags }}'\n\n  docker:\n    name: Build Docker Image\n    runs-on: ubuntu-latest\n    needs: check\n    if: needs.check.outputs.is_update == 'true'\n    steps:\n      - uses: actions/checkout@v3\n      # see https://github.com/marketplace/actions/docker-login\n      - uses: docker/login-action@v2.0.0\n        with:\n          username: ${{ secrets.DOCKER_USERNAME }}\n          password: ${{ secrets.DOCKER_PASSWORD }}\n      # see https://github.com/marketplace/actions/docker-metadata-action\n      - uses: docker/metadata-action@v4.0.1\n        id: meta\n        with:\n          images: |\n            ${{ github.repository_owner }}/latest-version\n          tags: |\n            type=schedule,pattern={{date 'YYYYMMDD'}}\n            ${{ needs.check.outputs.docker_tags }}\n        # see https://github.com/marketplace/actions/build-and-push-docker-images\n      - uses: docker/build-push-action@v3\n        with:\n          context: .\n          tags: ${{ steps.meta.outputs.tags }}\n```\n\n## LICENSE\n\nThe code in this project is released under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmogeko%2Flatest-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmogeko%2Flatest-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmogeko%2Flatest-version/lists"}