You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
How can I apply different settings for each workflow I have?
So, I have 4 workflows.
I want workflow 1 to be deleted after 14 days and keep a minimum of 7;
I want workflow 2 to be deleted after 63 days and keep a minimum of 75;
etc...
How can I manage this in one file? Or do I need 4 workflows to deleted the other 4 workflows?
The text was updated successfully, but these errors were encountered:
You should be able to do it in one workflow. Just call the action multiple times:
steps:
- name: Delete workflow runs 1
uses: MajorScruffy/delete-workflow-runs
id: delete-workflow-runs-1
with:
repository: MajorScruffy/delete-workflow-runs # replace this with your own repository
workflow: .github/workflows/workflow1.yml # replace this with the path to your first workflow
older-than-seconds: 1209600
maximum-workflow-runs-to-keep: 7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete workflow runs 2
uses: MajorScruffy/delete-workflow-runs
id: delete-workflow-runs-2
with:
repository: MajorScruffy/delete-workflow-runs # replace this with your own repository
workflow: .github/workflows/workflow2.yml # replace this with the path to your second workflow
older-than-seconds: 5443200
maximum-workflow-runs-to-keep: 75
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
You could call the action at the start of each workflow, so that each workflow takes care of its own clean-up, or you could have a separate workflow that runs on a schedule and calls the action once for each workflow. That's up to you.
How can I apply different settings for each workflow I have?
So, I have 4 workflows.
I want workflow 1 to be deleted after 14 days and keep a minimum of 7;
I want workflow 2 to be deleted after 63 days and keep a minimum of 75;
etc...
How can I manage this in one file? Or do I need 4 workflows to deleted the other 4 workflows?
The text was updated successfully, but these errors were encountered: