Handle the version from the release event

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-04-10 19:38:12 +01:00 committed by Pedro Algarvio
parent 2434cd9cbc
commit d6210277ec
2 changed files with 4 additions and 1 deletions

View file

@ -43,4 +43,4 @@ jobs:
env:
VIRUSTOTAL_API_KEY: ${{ secrets.VIRUSTOTAL_API_KEY }}
run: |
tools release upload-virustotal ${{ inputs.salt-version }}
tools release upload-virustotal ${{ inputs.salt-version || github.ref_name }}

View file

@ -130,6 +130,9 @@ def upload_virustotal(ctx: Context, salt_version: str):
# Get a list of files to upload
files_to_copy: list[str]
if salt_version.startswith("v"):
salt_version = salt_version[1:]
ctx.info("Grabbing remote file listing of files in staging ...")
s3 = boto3.client("s3")
repo_release_files_path = pathlib.Path(