mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
Delete of artifacts (#5974)
This commit is contained in:
parent
4c721c1b20
commit
d2a10afa02
2
.github/workflows/delete_artifacts.py
vendored
2
.github/workflows/delete_artifacts.py
vendored
@ -9,7 +9,7 @@ repo_name = "ResInsight"
|
||||
keep_artifacts = 20
|
||||
|
||||
def get_all_artifacts(repo_name: str, headers: dict) -> []:
|
||||
amount_items_per_page = 10
|
||||
amount_items_per_page = 50
|
||||
page = 1
|
||||
|
||||
ref = "https://api.github.com/repos/" + org_name + "/" + repo_name + "/actions/artifacts" + "?per_page=" + str(amount_items_per_page)
|
||||
|
15
.github/workflows/delete_artifacts.yml
vendored
15
.github/workflows/delete_artifacts.yml
vendored
@ -11,6 +11,15 @@ jobs:
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Remove old artifacts
|
||||
working-directory: .github/workflows/
|
||||
run: python delete_artifacts.py ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: setup python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Remove old artifacts
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install urllib3 requests
|
||||
cd .github/workflows
|
||||
python delete_artifacts.py ${{ secrets.GITHUB_TOKEN }}
|
||||
|
Loading…
Reference in New Issue
Block a user