Skip to content

Commit

Permalink
feat: enhance release workflow with environment variable checks and i…
Browse files Browse the repository at this point in the history
…mproved error handling
  • Loading branch information
jjjermiah committed Jan 16, 2025
1 parent 8ffd002 commit 388899c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/release_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,25 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15 # Consider increasing timeout

env:
NBIA_USERNAME: ${{ secrets.NBIA_USERNAME }}
NBIA_PASSWORD: ${{ secrets.NBIA_PASSWORD }}

steps:
- uses: actions/checkout@v4

- name: Checkout repository
uses: actions/checkout@v3

- name: Display environment variables
run: |
echo "NBIA_USERNAME is $NBIA_USERNAME"
if [ -z "$NBIA_PASSWORD" ]; then
echo "NBIA_PASSWORD is not set"
else
echo "NBIA_PASSWORD is set"
fi
- name: Install Pixi
uses: prefix-dev/[email protected]
with:
Expand Down
5 changes: 4 additions & 1 deletion download.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
from rich import print
from yaml import safe_load

load_dotenv()
if Path(".env").exists():
load_dotenv()

NBIA_USERNAME = os.getenv("NBIA_USERNAME")
NBIA_PASSWORD = os.getenv("NBIA_PASSWORD")

if not NBIA_USERNAME or not NBIA_PASSWORD:
raise ValueError("NBIA_USERNAME or NBIA_PASSWORD not found in .env file")

# %%
yaml_file = Path().cwd() / "nbia.yaml"
Expand Down

0 comments on commit 388899c

Please sign in to comment.