Skip to content

Commit f486053

Browse files
Merge pull request #1437 from ZzEeKkAa/feature/add_cleanup
Add clean up job
2 parents 6d681db + e1e2dba commit f486053

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/conda-package.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,36 @@ jobs:
392392
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
393393
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.whl --version ${{ env.PACKAGE_VERSION }}
394394

395+
cleanup_packages:
396+
name: Clean up anaconda packages
397+
needs: [upload_linux, upload_windows]
398+
runs-on: 'ubuntu-latest'
399+
defaults:
400+
run:
401+
shell: bash -el {0}
402+
steps:
403+
- uses: conda-incubator/setup-miniconda@v2
404+
with:
405+
run-post: false
406+
channel-priority: "disabled"
407+
channels: conda-forge
408+
python-version: '3.11'
409+
410+
- name: Install anaconda-client
411+
run: conda install anaconda-client
412+
413+
- name: Checkout repo
414+
uses: actions/checkout@v2
415+
with:
416+
repository: IntelPython/devops-tools
417+
fetch-depth: 0
418+
419+
- name: Cleanup old packages
420+
run: |
421+
python scripts/cleanup-old-packages.py \
422+
--verbose --force --token ${{ secrets.ANACONDA_TOKEN }} \
423+
--package dppy/${{ env.PACKAGE_NAME }} --label dev
424+
395425
test_examples_linux:
396426
needs: build_linux
397427
runs-on: ${{ matrix.runner }}

0 commit comments

Comments
 (0)