Migrate from GitHub Reusable Workflows to GitHub Actions#104
Migrate from GitHub Reusable Workflows to GitHub Actions#104jeffhandley merged 7 commits intodotnet:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the issue-labeler workflows from GitHub Reusable Workflows to a GitHub Actions–based approach to improve usability, stability, and maintainability. Key changes include new and updated workflows for release, training, promotion, prediction (for both issues and pull requests), cache retention, and a dedicated CI build.
Reviewed Changes
Copilot reviewed 60 out of 73 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/release.yml | New release workflow for publishing the predictor container image. |
| .github/workflows/labeler-train.yml | Updated training workflow with streamlined inputs and step-based control. |
| .github/workflows/labeler-promote.yml | Revised promotion workflow with updated input names and backup parameters. |
| .github/workflows/labeler-predict-pulls.yml | Updated pull request prediction workflow with refined input and condition logic. |
| .github/workflows/labeler-predict-issues.yml | Updated issue prediction workflow with refined input and condition logic. |
| .github/workflows/labeler-cache-retention.yml | Updated cache retention workflow that restores models to prevent eviction. |
| .github/workflows/ci-build.yml | New CI build workflow to build and test the IssueLabeler solution. |
Files not reviewed (13)
- .github/workflows/build-predictor.yml: Language not supported
- .github/workflows/build.yml: Language not supported
- .github/workflows/cache-retention.yml: Language not supported
- .github/workflows/download-issues.yml: Language not supported
- .github/workflows/download-pulls.yml: Language not supported
- .github/workflows/labeler-build-predictor.yml: Language not supported
- .github/workflows/predict-issues.yml: Language not supported
- .github/workflows/predict-pulls.yml: Language not supported
- .github/workflows/promote-issues.yml: Language not supported
- .github/workflows/promote-pulls.yml: Language not supported
- .github/workflows/test-issues.yml: Language not supported
- .github/workflows/test-pulls.yml: Language not supported
- .github/workflows/train-issues.yml: Language not supported
Comments suppressed due to low confidence (5)
.github/workflows/release.yml:15
- Confirm that the tag 'noble-chiseled' for the BASE_IMAGE is intentional as it deviates from conventional version numbers.
BASE_IMAGE: mcr.microsoft.com/dotnet/runtime:9.0-noble-chiseled
.github/workflows/labeler-predict-pulls.yml:41
- Ensure that updating the repository owner condition from 'dotnet' to 'jeffhandley' is intended.
if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'jeffhandley' }}
.github/workflows/labeler-predict-issues.yml:32
- Verify that changing the repository owner check to 'jeffhandley' aligns with the intended deployment scope.
if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'jeffhandley' }}
.github/workflows/labeler-cache-retention.yml:24
- Confirm that the cache retention condition now targeting 'jeffhandley' as repository owner (instead of 'dotnet') is intentional.
if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'jeffhandley' }}
.github/workflows/labeler-train.yml:48
- [nitpick] Consider if using the string "null" for EXCLUDED_AUTHORS is intentional or if an empty value or explicit null would be more appropriate.
EXCLUDED_AUTHORS: "null"
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the issue-labeler workflows from reusable workflows to GitHub Actions, improving usability, stability, and maintainability. Key changes include:
- Introduction of new workflows (release, CI build) and updated workflows for training, promotion, prediction, and cache retention.
- Consolidation and renaming of input parameters and jobs for clarity and consistency.
- Enhanced error handling and reporting through richer job summaries.
Reviewed Changes
Copilot reviewed 60 out of 73 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/release.yml | New release workflow for publishing the Docker container image. |
| .github/workflows/labeler-train.yml | Updated training workflow with restructured inputs and standardized naming. |
| .github/workflows/labeler-promote.yml | Updated promotion workflow with clearer input naming. |
| .github/workflows/labeler-predict-pulls.yml | Updated prediction workflow for pull requests with modified input names. |
| .github/workflows/labeler-predict-issues.yml | Updated prediction workflow for issues with modified input names. |
| .github/workflows/labeler-cache-retention.yml | Updated cache retention workflow with revised cache key handling. |
| .github/workflows/ci-build.yml | New CI build workflow for building and testing the solution. |
Files not reviewed (13)
- .github/workflows/build-predictor.yml: Language not supported
- .github/workflows/build.yml: Language not supported
- .github/workflows/cache-retention.yml: Language not supported
- .github/workflows/download-issues.yml: Language not supported
- .github/workflows/download-pulls.yml: Language not supported
- .github/workflows/labeler-build-predictor.yml: Language not supported
- .github/workflows/predict-issues.yml: Language not supported
- .github/workflows/predict-pulls.yml: Language not supported
- .github/workflows/promote-issues.yml: Language not supported
- .github/workflows/promote-pulls.yml: Language not supported
- .github/workflows/test-issues.yml: Language not supported
- .github/workflows/test-pulls.yml: Language not supported
- .github/workflows/train-issues.yml: Language not supported
Comments suppressed due to low confidence (2)
.github/workflows/labeler-predict-pulls.yml:38
- [nitpick] Consider renaming the job 'predict-pull-label' to 'predict-pulls' to maintain consistent naming with the issues prediction workflow ('predict-issue-label').
predict-pull-label:
.github/workflows/labeler-train.yml:17
- [nitpick] Consider renaming the 'steps' input to 'training_steps' to distinguish it from the workflow's job steps and improve clarity.
steps:
1c23b6f to
768b7a5
Compare
Update the release workflow to write a summary and update the predict action to use the new digest
768b7a5 to
3f1722d
Compare
RussKie
left a comment
There was a problem hiding this comment.
Opps, it appears I never posted this...
| private ICoreService action; | ||
| private Action<string?> showUsage; | ||
| private Queue<string>? arguments { get; } |
There was a problem hiding this comment.
I'd prefer we used the same naming conventions and code styles used throughout dotnet/* repos - specifically here: underscore fields, no "this.". The getter here doesn't look justified either.
| if (arguments is not null) | ||
| { | ||
| if (arguments.TryDequeue(out string? argValue)) | ||
| { | ||
| input = argValue; | ||
| } | ||
| } | ||
| else | ||
| { | ||
| input = action.GetInput(inputName); | ||
| } |
There was a problem hiding this comment.
I think if we invert this, it'd be simpler:
| if (arguments is not null) | |
| { | |
| if (arguments.TryDequeue(out string? argValue)) | |
| { | |
| input = argValue; | |
| } | |
| } | |
| else | |
| { | |
| input = action.GetInput(inputName); | |
| } | |
| if (arguments is null) | |
| { | |
| input = action.GetInput(inputName); | |
| } | |
| else if (arguments.TryDequeue(out string? argValue)) | |
| { | |
| input = argValue; | |
| } |
Since launching Release v1.0.0 - 2025-03-06 - Initial version of GitHub workflow-based Issue Labeler, we've accumulated feedback and explored how to take this even further by migrating from Reusable Workflows to GitHub Actions. This will offers notable usability, stability, and maintainability benefits both for the implementation of the issue-labeler and more so for repositories that consume it.
Some reference documents on the types of reusability:
Notable Benefits
predictor-appand store it in the GitHub Action Cache, and use workflows to try to prevent the app from being evicted from cache.action.ymlfiles, and the workflows in each consuming repository are simpler to set up and maintainMigration for Consumers
Once a release with the GitHub Actions based implementation is merged, consumers will migrate by:
labeler-build-predictor.ymlworkflowlabeler-cache-retention.ymlworkflowlabeler-predict-issues.ymlworkflowlabeler-predict-pulls.ymlworkflowlabeler-promote.ymlworkflowlabeler-train.ymlworkflowissue-labelerAction Cache entries, including theissue-labeler/predictor-appand all modelslabeler-train.ymlworkflow to re-train the models, as the cache key naming conventions were updatedlabeler-promote.ymlworkflow to promote the newly trained workflows into useIssues Resolved
The following issues are resolved with this PR:
Fixes #87
Fixes #93
Fixes #95
Fixes #97
Fixes #98
Fixes #99
Fixes #100
Fixes #103
Workflow Onboarding and Execution
Issue labeler onboarding (jeffhandley/labeler-demo#1) illustrates the revised onboarding experience for adding the worfklows into a repository.
Here are example workflow runs showing the training, promotion, prediction, and cache retention job results: