-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Github Actions to run Plugin Modernizer Tool to be used by Plugin Repositories #681
Added Github Actions to run Plugin Modernizer Tool to be used by Plugin Repositories #681
Conversation
Signed-off-by: shinigami-777 <[email protected]>
As a consumer of an action I would expect something as easy as - name: Run Plugin Modernizer
uses: plugin-modernizer/modernizer-action@v2
env:
MODERNIZER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
This PR doesn't fix not do anything. It's simply add a workflow files but doesn't implement any action to run plugin modernizer The goal is
I'm closing this PR because it's out of scope of the #537 |
Thanks for the clarity. I understand Maven won't be necessary. Can I give this another try? |
I suggest taken a look at https://github.com/jreleaser/release-action (mentionned on the issue). It's an other java CLI so implmenetation should be quiete similar. The action even has a workflow to test himself : https://github.com/jreleaser/release-action/blob/main/.github/workflows/test.yml |
Steps:
name: 'Jenkins Plugin Modernizer'
description: 'Run the Jenkins Plugin Modernizer tool to update Jenkins plugins.'
inputs:
repo-token:
description: 'GitHub token for authentication'
required: true
target-branch:
description: 'Branch to run the modernizer on'
required: false
default: 'main'
runs:
using: 'docker'
image: 'docker://ghcr.io/jenkins-infra/plugin-modernizer-tool:latest'
args:
- ${{ inputs.repo-token }}
- ${{ inputs.target-branch }}
In name: 'Run Jenkins Plugin Modernizer'
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
modernize:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run Jenkins Plugin Modernizer
uses: ./.github/actions/modernizer-action
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
target-branch: ${{ github.head_ref }}
For example, they can add this to their repository: name: 'Run Jenkins Plugin Modernizer'
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
modernize:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run Jenkins Plugin Modernizer
uses: jenkins-infra/plugin-modernizer-tool/.github/actions/modernizer-action@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
target-branch: ${{ github.head_ref }}
We haven't set a version on the action, but it should follow the tool version. |
Towards #537.
Added a GitHub Actions workflow to be used by the plugins using the Jenkins Plugin Modernizer tool .
I have included the
action.yml
file in the.github/workflows/
folder although it won't be used by this repo but by the plugin repos. (Is there a more suitable location to have this? )Submitter checklist