Skip to content

Github action for reporting on outdated dotnet packages in a solution or npm packages in a project directory.

Notifications You must be signed in to change notification settings

trossr32/outdated-packages-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

outdated-packages-action

Github action for reporting on outdated dotnet packages in a solution or project, or npm packages in a project directory.

Overview

This action will run either or both of:

Note

The intention of this action is purely to notify of any outdated packages and not to perform any kind of update action.

Reports for any outdated packages found are added as a comment to the pull request used to run this action.

If the action is re-run against a pull request that has already been commented on, the existing comment will be updated.

Warning

This action is designed to be actioned only within the context of a pull request, no other scenarios are catered for.

Inputs

use-dotnet-outdated

Optional - Whether to run dotnet-outdated. Default false.

dotnet-solution-or-project-path

Optional - The path to the dotnet solution or project file. Required if use-dotnet-outdated is true.

dotnet-exclude-packages

Optional - Names of packages to exclude from the check. Optional if use-dotnet-outdated is true. Space delimited string of package names, e.g. "Microsoft.Extensions.Logging Microsoft.Extensions.Logging.Abstractions"

use-npm-outdated

Optional - Whether to run npm-update-check-action. Default false.

npm-project-directory

Optional - The path to the npm project directory. Default ..

hide-successful-checks

Optional - When true, don't add a success comment to the PR when checks are successful. Default false.

Example github action

outdated.yml

name: Outdated package checks

# Run workflow on pull request to the main branch
on:
  pull_request:
    types: [opened, synchronize, reopened]
    branches: [ main ]

env:
  SOLUTION_PATH: 'src/RobGreenEngineering.sln'
  PROJECT_DIR: 'src/RobGreenEngineering'
  EXCLUDE_PACKAGES: 'Microsoft.Extensions.Logging Microsoft.Extensions.Logging.Abstractions'

jobs:
  outdated-packages-check:
    runs-on: ubuntu-latest
    # grant pull request write permission if 'Read and write permissions' is not active for actions in the repository
    permissions:
      pull-requests: write

    steps:
      - uses: trossr32/outdated-packages-action@v1.6.0
        with:
          # Whether to run dotnet-outdated. Default is false if not supplied.
          use-dotnet-outdated: true

          # The path to the dotnet solution or project file. Required if use-dotnet-outdated is true.
          dotnet-solution-or-project-path: ${{ env.SOLUTION_PATH }}

          # Names of packages to exclude from the check. Optional if use-dotnet-outdated is true.
          # Space delimited string of package names, e.g. "Microsoft.Extensions.Logging Microsoft.Extensions.Logging.Abstractions"
          dotnet-exclude-packages: ${{ env.EXCLUDE_PACKAGES }}

          # Whether to run npm-update-check-action. Default is false if not supplied.
          use-npm-outdated: true

          # The path to the npm project directory.
          # Default is '.', so only required if the npm project is not the root of the repository.
          npm-project-directory: ${{ env.PROJECT_DIR }}

          # When true, don't add a success comment to the PR when checks are successful. Default is false if not supplied.
          hide-successful-checks: false

Example output

dotnet packages are outdated

dotnet-outdated

dotnet packages up to date

dotnet-not-outdated

npm packages are outdated

npm-outdated

npm packages up to date

npm-not-outdated

Credit

This action leverages these projects:

Contribute

Please create a pull request and get in touch. Alternatively feel free to raise an issue if you've found a bug or want to suggest a new feature.

About

Github action for reporting on outdated dotnet packages in a solution or npm packages in a project directory.

Topics

Resources

Stars

Watchers

Forks