Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add load-env validation
Browse files Browse the repository at this point in the history
msz-rai committed Feb 22, 2024
1 parent 0b6f8f6 commit 3924c4b
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/load-env-subworkflow.yml
Original file line number Diff line number Diff line change
@@ -12,10 +12,20 @@ jobs:
load-env:
runs-on: self-hosted
outputs:
optix-install-dir: ${{ steps.set-env.outputs.optix-install-dir }}
user-id: ${{ steps.set-env.outputs.user-id }}
optix-install-dir: ${{ steps.set-envs.outputs.optix-install-dir }}
user-id: ${{ steps.set-envs.outputs.user-id }}
steps:
- id: set-env
- id: check-envs
run: |
echo "optix-install-dir=$OptiX_INSTALL_DIR" >> $GITHUB_OUTPUT
echo "user-id=$(id -u $USER)" >> $GITHUB_OUTPUT
if [[ -z "${OptiX_INSTALL_DIR}" ]]; then
echo "OptiX_INSTALL_DIR env is empty"
exit 1
fi
if [[ -z "$(id -u $USER)" ]]; then
echo "Cannot deduce id of the USER"
exit 1
fi
- id: set-envs
run: |
echo "optix-install-dir=$OptiX_INSTALL_DIR" | tee -a $GITHUB_OUTPUT
echo "user-id=$(id -u $USER)" | tee -a $GITHUB_OUTPUT

0 comments on commit 3924c4b

Please sign in to comment.