This commit is contained in:
Bryan Gerlach
2026-02-11 15:43:14 -06:00
parent 0cfe1ffb4c
commit bb43e468ac
2 changed files with 28 additions and 32 deletions

View File

@@ -12,27 +12,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download with Retry
shell: python
run: |
import requests
import json
import time
uses: nick-fields/retry@v3
with:
timeout_minutes: 1
max_attempts: 3
shell: python
command: |
import requests
import json
import time
input_data = json.loads('${{ inputs.zip_url_json }}')
url = f"{input_data['url']}/get_zip?filename={input_data['file']}"
for attempt in range(5):
try:
print(f"Downloading (Attempt {attempt + 1})...")
r = requests.get(url, timeout=20)
r.raise_for_status()
with open('secrets.zip', 'wb') as f:
f.write(r.content)
break
except Exception as e:
if attempt < 4:
time.sleep(5 * (2 ** attempt))
else: raise e
input_data = json.loads('${{ inputs.zip_url_json }}')
url = f"{input_data['url']}/get_zip?filename={input_data['file']}"
for attempt in range(5):
try:
print(f"Downloading (Attempt {attempt + 1})...")
r = requests.get(url, timeout=20)
r.raise_for_status()
with open('secrets.zip', 'wb') as f:
f.write(r.content)
break
except Exception as e:
if attempt < 4:
time.sleep(5 * (2 ** attempt))
else: raise e
- name: Upload Encrypted Artifact
uses: actions/upload-artifact@v4