cloudsmith-io / action

Github Action that uses the cloudsmith cli to interact with the Cloudsmith API (pushes, etc)
https://github.com/marketplace/actions/cloudsmith-push
MIT License
15 stars 12 forks source link

Pass through variables to the python script #31

Closed DavidS-cloud closed 2 years ago

DavidS-cloud commented 2 years ago

What's Changed

Fix CI failure:

Traceback (most recent call last):
  File "<string>", line 4, in <module>
NameError: name 'query' is not defined
Usage: cloudsmith tags add [OPTIONS] OWNER/REPO/PACKAGE TAGS
Try 'cloudsmith tags add -h' for help.

Error: Invalid value for 'OWNER/REPO/PACKAGE': Individual values cannot be blank

from https://github.com/cloudsmith-io/action/runs/8268312418?check_suite_focus=true#step:3:144

cc @jtojnar

jtojnar commented 2 years ago

Thanks, somehow I never tested the error condition.

Weirdly, it still fails. cloudsmith list packages either returns multiple packages or, more likely, none.

Looking at the log, most likely that the file name on the server is just the basename:

cloudsmith push raw cloudsmith/actions test/fixture/raw_file.txt --name='Raw Test' --summary='Github Action test of raw pushes' --description='See https://github.com/cloudsmith-io/action' --version='16fadf3a86f51bfe7292766e02bc75133de14b79' --sync-attempts 5

Checking raw package upload parameters ... OK
Checking raw_file.txt file upload parameters ... OK
Requesting file upload for raw_file.txt ... OK
Uploading raw_file.txt:
Creating a new raw package ... OK
Created: cloudsmith/actions/raw_filetxt-xMo (jfiVaq8684Yy)

Synchronising raw_filetxt-xMo:

Package synchronised successfully in 16.529947 second(s)!

Getting list of packages ... OK
Traceback (most recent call last):
  File "<string>", line 4, in <module>
AssertionError: Query “filename:test/fixture/raw_file.txt version:16fadf3a86f51bfe7292766e02bc75133de14b79” needs to match a single package in repository “cloudsmith/actions” to be able to add tags.
jtojnar commented 2 years ago

Opened https://github.com/cloudsmith-io/action/pull/32