CDCgov / prime-reportstream

ReportStream is a public intermediary tool for delivery of data between different parts of the healthcare ecosystem.
https://reportstream.cdc.gov
Creative Commons Zero v1.0 Universal
72 stars 40 forks source link

Importing JosiahSiegel GHA: workflow-housekeeper@v1.1.0 #16162

Open emvaldes opened 1 month ago

emvaldes commented 1 month ago

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:

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.

Usage Example:

- name: Checkout
  uses: actions/checkout@v3

- name: Run Workflow Housekeeper
  uses: josiahsiegel/workflow-housekeeper@v1.1.0
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  with:
    ignore-branch-workflows: true
    retention-time: '1 days'
    retain-run-count: 1
    dry-run: false

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.

emvaldes commented 1 month ago

This external repo is now inserted in the file structure at: .github/actions/workflow-housekeeper in the importing-gha branch.

emvaldes commented 1 month ago
$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
emvaldes commented 1 month ago

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.