ci: allow pull requests

disable tests if env secrets are empty

- detect emtpy aws token
- upload: check for aptly creds
This commit is contained in:
André Roth
2024-09-21 16:36:54 +02:00
parent 67d04ca878
commit 20c81d7f9a
2 changed files with 8 additions and 1 deletions

View File

@@ -5,7 +5,8 @@ import os
try:
import boto
if 'AWS_SECRET_ACCESS_KEY' in os.environ and 'AWS_ACCESS_KEY_ID' in os.environ:
if 'AWS_SECRET_ACCESS_KEY' in os.environ and 'AWS_ACCESS_KEY_ID' in os.environ and \
os.environ['AWS_SECRET_ACCESS_KEY'] != "" and os.environ['AWS_ACCESS_KEY_ID'] != "":
s3_conn = boto.connect_s3()
else:
print("S3 tests disabled: AWS creds not found in the environment (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)")