{"id":18799104,"url":"https://github.com/marcoeidinger/swift-package-dependencies-check","last_synced_at":"2025-06-21T08:34:40.781Z","repository":{"id":41817756,"uuid":"302907103","full_name":"MarcoEidinger/swift-package-dependencies-check","owner":"MarcoEidinger","description":"Catch up with outdated versions based on your package dependency requirements","archived":false,"fork":false,"pushed_at":"2023-09-20T13:24:30.000Z","size":33,"stargazers_count":85,"open_issues_count":3,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-27T08:11:39.465Z","etag":null,"topics":["dependency-management","github-actions","spm","swift"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarcoEidinger.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-10-10T13:23:22.000Z","updated_at":"2025-02-20T03:48:38.000Z","dependencies_parsed_at":"2024-06-18T22:36:11.728Z","dependency_job_id":"be9da234-1ccd-496c-bd47-92e76bf630b8","html_url":"https://github.com/MarcoEidinger/swift-package-dependencies-check","commit_stats":{"total_commits":25,"total_committers":4,"mean_commits":6.25,"dds":0.48,"last_synced_commit":"547ecbb6938dd59053ab722286405d579716fc25"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":"actions/hello-world-docker-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoEidinger%2Fswift-package-dependencies-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoEidinger%2Fswift-package-dependencies-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoEidinger%2Fswift-package-dependencies-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoEidinger%2Fswift-package-dependencies-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcoEidinger","download_url":"https://codeload.github.com/MarcoEidinger/swift-package-dependencies-check/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248750941,"owners_count":21155801,"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":["dependency-management","github-actions","spm","swift"],"created_at":"2024-11-07T22:14:07.147Z","updated_at":"2025-04-13T17:23:09.667Z","avatar_url":"https://github.com/MarcoEidinger.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swift Package Dependencies Checker\n\nThis action process your Package.swift file to detect outdated versions based on your [package dependency requirements](https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html#package-dependency-requirement).\n\nThis action requires [actions/checkout](https://github.com/actions/checkout) in order to function correctly.\n\n```yaml\n  spm-dep-check:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: MarcoEidinger/swift-package-dependencies-check@v2\n```\n\nAction will fail in case there are outdated dependencies. This can be suppressed by setting input parameter `failWhenOutdated` to false. Then use output parameter `outdatedDependencies` to know if action detected any outdated dependencies.\n\n```yaml\n  spm-dep-check:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: MarcoEidinger/swift-package-dependencies-check@2.3.2\n        with:\n          failWhenOutdated: false # or 'false'\n```\n\nBy setting `isMutating` you declare the intention to update `Package.resolved` (if present). Please note that the action itself does not commit/push changes.\n\n```yaml\n  spm-dep-check:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: MarcoEidinger/swift-package-dependencies-check@v2\n        with:\n          isMutating: 'true' # or true\n```\n\nWhen setting `isMutating` the tool [SwiftPackageIndex/ReleaseNotes](https://github.com/SwiftPackageIndex/ReleaseNotes) is used to return release notes URLs for detected, necessary updates.\n\nThe GitHub action is looking in the current directory (`.`) for the package manifest but you can pass a different path with input parameter `directory`. Helpful for Monorepos where the `Package.swift` may not be at the root of the project.\n\n```yaml\n  - name: Check Swift Package dependencies\n    id: spm-dep-check\n    uses: Sherlouk/swift-package-dependencies-check@main\n    with:\n      isMutating: true\n      failWhenOutdated: false\n      directory: 'Ingest'\n```\n\nA possible _workflow_ to periodically check for outdated dependencies and then create a pull request to update them: \n\n```yaml\nname: Swift Package Dependencies\n\non: \n  schedule:\n    - cron: '0 8 * * 1' # every monday AM 8:00\njobs:\n  spm-dep-check:\n    runs-on: ubuntu-20.04\n    steps:\n    - uses: actions/checkout@v3\n    - name: Check Swift package dependencies\n      id: spm-dep-check\n      uses: MarcoEidinger/swift-package-dependencies-check@2.3.2\n      with:\n         isMutating: true\n         failWhenOutdated: false\n    - name: Create Pull Request\n      if: steps.spm-dep-check.outputs.outdatedDependencies  == 'true'\n      uses: peter-evans/create-pull-request@v3\n      with:\n        commit-message: 'chore: update package dependencies'\n        branch: updatePackageDepedencies\n        delete-branch: true\n        title: 'chore: update package dependencies'\n        body: ${{ steps.spm-dep-check.outputs.releaseNotes }}\n```\n\nFor your convenience I created a workflow which can reuse like this.\n\n```yaml\nname: Swift Package Dependencies\n\non: \n  schedule:\n    - cron: '0 8 * * 1' # every monday AM 8:00 \njobs:\n  dependencies:\n    uses: MarcoEidinger/swift-package-dependencies-check/.github/workflows/reusableWorkflow.yml@v2\n    with:\n      commit-message: 'chore: update package dependencies'\n\n```\n\nInternally the action utilizes `swift package show-dependencies` and `swift package update` (either with or without the `--dry-run` option). Per default it runs as non-modifying, i.e. with `--dry-run`.\n\nYou can also pin to a [specific release](MarcoEidinger/swift-package-dependencies-check/releases) version in the format @2.x.x\n\n- Version 2.5.x is using Swift 5.9\n- Version 2.4.x is using Swift 5.8\n- Version 2.3.x is using Swift 5.7\n- Version 2.2.x is using Swift 5.6\n- Version 2.1.x is using Swift 5.5\n- Version 2.0.x is using Swift 5.5\n- Version 1.1.x is using Swift 5.3\n- Version 1.0.x is using Swift 5.2\n\nThe action will fail if `swift package update` (`--dry-run`) reports an error. This can occur if your package requires a Swift tools version different from the one used by this GitHub action.\n\n\u003e For example, if your package needs `swift-tools-version: 5.7` then you have to use `MarcoEidinger/swift-package-dependencies-check@2.3.0` or higher.\n\u003e \n\u003e The action will fail when using `MarcoEidinger/swift-package-dependencies-check@2.2.0` because the action uses Swift 5.6.\n\n## Similar Packages\n\n- [action-xcodeproj-spm-update](https://github.com/getsidetrack/action-xcodeproj-spm-update) is a GitHub Action which helps to resolve the Swift Package Manager dependencies within your Xcode project (as opposed to dependencies in Swift Packages).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoeidinger%2Fswift-package-dependencies-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcoeidinger%2Fswift-package-dependencies-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoeidinger%2Fswift-package-dependencies-check/lists"}