Skip to content

Commit

Permalink
settings-2-deploy.yml: Error handling where spack is not deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeGat committed Jul 31, 2024
1 parent de74681 commit 737c5f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/settings-2-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ jobs:
--argjson vs "${{ inputs.spack-update }}" \
'$vs[$v]'
)
current_head_commit=$(git rev-parse HEAD)
current_head_commit=$(git -C ${{ secrets.SPACK_INSTALLS_ROOT_LOCATION }}/$version/spack rev-parse HEAD)
if [ $? -eq 128 ]; then
echo "::error::Error: ${{ inputs.deployment-environment }} ${{ inputs.spack-type }} $version spack does not exist. Deploy it via build-cds Create Deployment Spack workflow first."
continue
fi
git -C ${{ secrets.SPACK_INSTALLS_ROOT_LOCATION }}/$version/spack fetch
if [[ "$current_head_commit" != "$new_commit" ]]; then
Expand Down

0 comments on commit 737c5f4

Please sign in to comment.