.
This commit is contained in:
42
.github/workflows/fetch-encrypted-secrets.yml
vendored
42
.github/workflows/fetch-encrypted-secrets.yml
vendored
@@ -12,27 +12,31 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download with Retry
|
- name: Download with Retry
|
||||||
shell: python
|
uses: nick-fields/retry@v3
|
||||||
run: |
|
with:
|
||||||
import requests
|
timeout_minutes: 1
|
||||||
import json
|
max_attempts: 3
|
||||||
import time
|
shell: python
|
||||||
|
command: |
|
||||||
|
import requests
|
||||||
|
import json
|
||||||
|
import time
|
||||||
|
|
||||||
input_data = json.loads('${{ inputs.zip_url_json }}')
|
input_data = json.loads('${{ inputs.zip_url_json }}')
|
||||||
url = f"{input_data['url']}/get_zip?filename={input_data['file']}"
|
url = f"{input_data['url']}/get_zip?filename={input_data['file']}"
|
||||||
|
|
||||||
for attempt in range(5):
|
for attempt in range(5):
|
||||||
try:
|
try:
|
||||||
print(f"Downloading (Attempt {attempt + 1})...")
|
print(f"Downloading (Attempt {attempt + 1})...")
|
||||||
r = requests.get(url, timeout=20)
|
r = requests.get(url, timeout=20)
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
with open('secrets.zip', 'wb') as f:
|
with open('secrets.zip', 'wb') as f:
|
||||||
f.write(r.content)
|
f.write(r.content)
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if attempt < 4:
|
if attempt < 4:
|
||||||
time.sleep(5 * (2 ** attempt))
|
time.sleep(5 * (2 ** attempt))
|
||||||
else: raise e
|
else: raise e
|
||||||
|
|
||||||
- name: Upload Encrypted Artifact
|
- name: Upload Encrypted Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
14
.github/workflows/generator-windows.yml
vendored
14
.github/workflows/generator-windows.yml
vendored
@@ -43,17 +43,9 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
name: setup
|
uses: ./.github/workflows/fetch-encrypted-secrets.yml
|
||||||
runs-on: ubuntu-latest
|
with:
|
||||||
steps:
|
zip_url_json: ${{ inputs.zip_url }}
|
||||||
- name: Checkout Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: Wandalen/wretry.action@master
|
|
||||||
with:
|
|
||||||
action: ./.github/workflows/fetch-encrypted-secrets.yml
|
|
||||||
with: |
|
|
||||||
zip_url_json: ${{ inputs.zip_url }}
|
|
||||||
|
|
||||||
generate-bridge:
|
generate-bridge:
|
||||||
uses: ./.github/workflows/bridge.yml
|
uses: ./.github/workflows/bridge.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user