-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathaction.yml
More file actions
46 lines (43 loc) · 1.6 KB
/
action.yml
File metadata and controls
46 lines (43 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Scientific Python / Remove Old Wheels
description: A GitHub Action to remove old wheels
permissions:
actions: read
contents: read
metadata: read
author: "Scientific-Python"
# TODO: have to think about versioning; whether to version separately, or
# for it to be in sync with the version for the upload action
version: "0.1.0"
inputs:
n_latest_uploads:
description: 'The number of previous wheel uploads to keep'
required: false
default: '5'
anaconda_nightly_upload_organization:
description: 'Anaconda Cloud organisation name to remove the wheels from'
required: false
default: scientific-python-nightly-wheels
anaconda_nightly_token:
description: 'Anaconda Cloud API token to authenticate with'
required: true
runs:
using: "composite"
steps:
- name: Set up pixi
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1
with:
locked: true
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
# Avoid post cleanup errors if action run multiple times
post-cleanup: false
# Action consumers should load the lock file from the action repo
manifest-path: ${{ github.action_path }}/pixi.toml
- name: Remove old wheels
shell: bash
env:
INPUT_N_LATEST_UPLOADS: ${{ inputs.n_latest_uploads }}
INPUT_ANACONDA_USER: ${{ inputs.anaconda_user }}
INPUT_ANACONDA_TOKEN: ${{ inputs.anaconda_token }}
run: |
pixi run --manifest-path ${{ github.action_path }}/pixi.toml ${{ github.action_path }}/remove_wheels.sh