Delete of artifacts (#5974)

This commit is contained in:
Magne Sjaastad 2020-05-23 09:06:04 +02:00 committed by GitHub
parent 4c721c1b20
commit d2a10afa02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View File

@ -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)

View File

@ -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 }}