-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a separate action for removing old wheels #95
Open
agriyakhetarpal
wants to merge
33
commits into
scientific-python:main
Choose a base branch
from
agriyakhetarpal:feat/separate-action-for-artifact-removals
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
d6264b8
Add a preliminary action for removing wheels
agriyakhetarpal 9d4f667
Clarify some of the inputs, improve descriptions
agriyakhetarpal 002d2e5
Rename original action to reflect wheel uploads
agriyakhetarpal 40cd6bc
Convert remove wheels step to a bash script
agriyakhetarpal 8a33f20
Fix up messages, improve comments
agriyakhetarpal b18b4a1
Rename org to user in sync with action's YAML
agriyakhetarpal deb3cba
Oops, don't let `pixi` `pip`-install `curl` and `jq`
agriyakhetarpal 05770f3
Use `./remove-wheels` internally
agriyakhetarpal 199b1c8
Don't mention "Anaconda Cloud" explicitly
agriyakhetarpal f8b96a0
Ensure consistency: use ANACONDA_USER
agriyakhetarpal 70f8a3d
Mark TODO about macOS support
agriyakhetarpal 2fac172
Clean up, add more TODOs and comments
agriyakhetarpal 6a1b65e
Merge branch 'main' into feat/separate-action-for-artifact-removals
agriyakhetarpal 8bb7bb6
Rename `anaconda_user` for consistency
agriyakhetarpal bae5ad6
Let ANACONDA_USER env var be empty
agriyakhetarpal f916adc
Merge branch 'main' into feat/separate-action-for-artifact-removals
agriyakhetarpal afedc16
Fix Anaconda org input
agriyakhetarpal 35c9d59
Add some docs sections
agriyakhetarpal 7a7dbbc
Merge branch 'main' into feat/separate-action-for-artifact-removals
bsipocz 7830eae
Merge branch 'main' into feat/separate-action-for-artifact-removals
matthewfeickert 2f62d85
Add some docs suggestions from code review
agriyakhetarpal 1f04be6
Rename upload token to just token for clarity
agriyakhetarpal b6dbd44
Use single line for command
agriyakhetarpal 88ce687
Fixes for `pixi` and shell script filename
agriyakhetarpal 03979b0
Add `jq` from conda-forge as a dependency
agriyakhetarpal bf8e993
Revert change to "Nightly upload" section
agriyakhetarpal 433e7c3
Revert `jq`'s addition to `pixi` global manifest file
agriyakhetarpal 4a3497d
Add a new manifest for the `remove-wheels` environment
agriyakhetarpal 71ede79
Generate `pixi.lock` file for `remove-wheels`
agriyakhetarpal 2d2e62a
Add a note about how tokens for packages work
agriyakhetarpal 556e9a6
Change to secondary-level heading
agriyakhetarpal e403c81
Move docs up, and workflow example below
agriyakhetarpal 15b617e
Update pixi lockfile to be version 5 compliant
agriyakhetarpal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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" # should be kept in sync with the version in remove-wheels/pixi.toml | ||
|
||
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 }}/remove-wheels/pixi.toml ${{ github.action_path }}/remove_wheels.sh |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is called organization, not channel; are these interchangeable terms? If so, use channel; if not, explain the difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not quite sure, since they look like they have been used interchangeably. For example, the README outside of this PR:
upload-nightly-action/README.md
Lines 48 to 67 in 920fb59
mentions how one may upload to a different channel, but it uses "organization" as an input.