Skip to content

Commit

Permalink
Update deploy-dev.yml: Add in review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-basevi committed Jun 16, 2024
1 parent f0831d5 commit c36f1d0
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
# Fetch the last successful workflow run time
response=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/access-nri/payu-condaenv/actions/workflows/deploy-dev.yml/runs?status=success&per_page=1)
last_run_time=$(echo $response | jq -r '.workflow_runs[0].updated_at')
last_run_time=$(gh run list --status success --workflow deploy-dev.yml --json updatedAt --jq .[0].updatedAt)
echo "Last successful workflow run time: $last_run_time"
echo "last-run-time=$last_run_time" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -141,16 +137,13 @@ jobs:
old_versions=$(ls "${{ vars.PRERELEASE_DEPLOYMENT_LOCATION }}" | grep -E '^dev-[0-9]{8}T[0-9]{6}Z-.*')
# Unpack conda enviroment
mkdir ${{ env.ENVIRONMENT_LOCATION }}
if [ $? -ne 0 ]; then
exit $?
fi
mkdir ${{ env.ENVIRONMENT_LOCATION }} || exit $?
tar -xzf ${{ env.PACKED_ENVIRONMENT }} -C ${{ env.ENVIRONMENT_LOCATION }}
source ${{ env.ENVIRONMENT_LOCATION }}/bin/activate
conda-unpack
payu --version
source ${{ env.ENVIRONMENT_LOCATION }}/bin/deactivate
echo "New payu/dev environment unpacked to ${{ env.ENVIRONMENT_LOCATION }}"
echo "::notice::New payu/dev environment unpacked to ${{ env.ENVIRONMENT_LOCATION }}"
# Check if payu/dev symlink already exists
if [ -L "${{ env.ENVIRONMENT_SYMLINK}}" ]; then
Expand Down

0 comments on commit c36f1d0

Please sign in to comment.