Skip to content

A GitHub action to provide a functionality similar to GitHub Dependabot for Ballerina projects.

License

Notifications You must be signed in to change notification settings

TharindaDilshan/ballerina-dependabot-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

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ballerina-dependabot-action Test

This GitHub action will provide a functionality similar to GitHub Dependabot for Ballerina projects. The action will check the Ballerina Central, for latest versions of the modules found in the Ballerina.toml file and raise Pull Requests for each module with version updates.

Usage

See this repo for a real world example.

Inputs

Input Required Description
git_email Yes GitHub email address
git_username Yes GitHub username
token Yes GitHub Access Token
file_path No Path to Ballerina.toml file

Note - File path is required if the Ballerina.toml file does not resides in the repository root.

If Ballerina.toml resides in the ballerina_project directory, file_path: ballerina_project/. The trailing / is required if the file_path is specified explicitly.

Example

- uses: TharindaDilshan/ballerina-dependabot-action@main
  with:
     git_email: ${{ secrets.GITHUB_EMAIL }}
     git_username: ${{ secrets.GITHUB_USERNAME}}
     token: ${{ secrets.GITHUB_TOKEN }}

Full Example

The action is scheduled to run every Sunday at 12:00 a.m.(IST) to check for dependency updates.

name: Ballerina Dependabot
on: 
  schedule:
        - cron: '30 18 * * 7'
jobs:
  resolve_dependencies:
    runs-on: ubuntu-latest
    name: Dependabot
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Dependabot Action
        uses: TharindaDilshan/ballerina-dependabot-action@main
        with:
          git_email: ${{ secrets.GITHUB_EMAIL }}
          git_username: ${{ secrets.GITHUB_USERNAME}}
          token: ${{ secrets.GITHUB_TOKEN }}
          file_path: project_1/

References

Creating encrypted secrets for a repository

GitHub workflow - scheduled events

About

A GitHub action to provide a functionality similar to GitHub Dependabot for Ballerina projects.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published