Open emvaldes opened 1 month ago
This external repo is now inserted in the file structure at: .github/actions/workflow-housekeeper in the importing-gha branch.
$GITHUB_STEP_SUMMARY
github.action_path
github.repository
inputs.dry-run
inputs.ignore-branch-workflows
inputs.retain-run-count
inputs.retention-time
secrets.GITHUB_TOKEN
steps.local-action.outputs.housekeeping_output
This GitHub Action (targeted to be imported as a remote/external) is no longer in consideration until we can further evaluate if they are worth the effort to be imported at a later stage.
Warning: I have placed it into the "IceBox" stage as it is out of scope for now.
Profile: JosiahSiegel Objective: Retain a time period or quantity of workflow runs.
Target: workflow-housekeeper@v1.1.0 : 731cc20
The
workflow-housekeeper
GitHub Action is designed to manage and retain workflow run histories within a repository. It offers functionality to retain workflow runs based on a specified time period or a set number of runs, helping to maintain a clean and efficient workflow history.Key Features:
Retention Criteria:
retention-time
: Defines the duration for which workflow runs should be retained (e.g., "2 weeks", "3 days").retain-run-count
: Specifies the number of most recent workflow runs to keep.Selective Workflow Management:
ignore-branch-workflows
: When set totrue
, the action ignores runs from workflows currently present in the.github/workflows
directory.Dry Run Capability:
dry-run
: If enabled, the action lists the runs pending deletion without actually removing them, allowing for a review before execution.Technical Evaluation:
The action is implemented as a composite action, executing a shell script (
housekeeper.sh
) to perform the housekeeping tasks. The script utilizes the GitHub API to fetch and manage workflow runs based on the provided inputs.Inputs:
ignore-branch-workflows
: Determines whether to exclude current branch workflows from housekeeping.retention-time
: Sets the time period for retaining workflow runs.retain-run-count
: Specifies the number of latest runs to retain.dry-run
: Indicates if the action should only list runs pending deletion without actual removal.Outputs:
housekeeping_output
: Provides a summary of the housekeeping operations performed.Usage Example:
Relevance to Your Pipeline:
If your repository experiences a high volume of workflow runs, leading to cluttered histories or storage concerns, the
workflow-housekeeper
action can be beneficial. It automates the cleanup process, ensuring that only relevant workflow runs are retained based on your specified criteria. However, if workflow run history management is not a concern in your pipeline, this action might be considered non-essential.Conclusion:
The
workflow-housekeeper
action provides automated management of workflow run histories, which can be valuable for maintaining an organized and efficient repository. Its relevance depends on your specific needs regarding workflow run retention and repository maintenance.