Kieran's opinionated (and probably slightly dumb) nix config

feat: make the timing on deploy more accurate

dunkirk.sh 2db836e0 fc090a38

verified
+2 -5
+2 -5
.github/workflows/deploy-service.yml
··· 69 69 id: deploy 70 70 run: | 71 71 C="\033[36m" G="\033[32m" Y="\033[33m" D="\033[2m" R="\033[0m" 72 - START=$(date +%s) 72 + echo "start=$(date +%s)" >> "$GITHUB_OUTPUT" 73 73 74 74 RESULT=$(ssh ${{ inputs.service }}@${{ inputs.host }} << 'DEPLOY' 75 75 set -e ··· 129 129 INSTALL 130 130 echo "::endgroup::" 131 131 132 - END=$(date +%s) 133 - echo "duration=$((END - START))s" >> "$GITHUB_OUTPUT" 134 - 135 132 echo -e "${G}:: deployed ${{ inputs.service }}${R}" 136 133 137 134 - name: Health check ··· 186 183 PREV_FULL="${{ steps.deploy.outputs.prev_full }}" 187 184 NEW_SHORT="${{ steps.deploy.outputs.new_short }}" 188 185 NEW_FULL="${{ steps.deploy.outputs.new_full }}" 189 - DURATION="${{ steps.deploy.outputs.duration }}" 186 + DURATION="$(($(date +%s) - ${{ steps.deploy.outputs.start }}))s" 190 187 HEALTH="${{ steps.health.outputs.status || steps.systemd.outputs.status }}" 191 188 HOST="${{ inputs.host }}" 192 189 REPO="https://github.com/${{ github.repository }}"