Embed build date in setup-remote.sh during CI publish
This commit is contained in:
@@ -108,7 +108,9 @@ jobs:
|
|||||||
SOS_WRITE_TOKEN: ${{ secrets.SOS_WRITE_TOKEN }}
|
SOS_WRITE_TOKEN: ${{ secrets.SOS_WRITE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
if [ "$GITHUB_REF" = "refs/heads/main" ]; then
|
if [ "$GITHUB_REF" = "refs/heads/main" ]; then
|
||||||
|
BUILD_DATE=$(TZ=Pacific/Auckland date +"%Y-%m-%d %H:%M %Z")
|
||||||
|
sed "s|__BUILD_DATE__|${BUILD_DATE}|g" ./setup-remote.sh > /tmp/setup-remote.sh
|
||||||
curl -L -s -o /tmp/sos "https://getbin.xyz/sos:latest"
|
curl -L -s -o /tmp/sos "https://getbin.xyz/sos:latest"
|
||||||
chmod +x /tmp/sos
|
chmod +x /tmp/sos
|
||||||
/tmp/sos upload "getbin.xyz" "./setup-remote.sh" "infmap-setup:latest"
|
/tmp/sos upload "getbin.xyz" "/tmp/setup-remote.sh" "infmap-setup:latest"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
BUILD_DATE="__BUILD_DATE__"
|
||||||
|
echo "infmap setup-remote (built: ${BUILD_DATE})"
|
||||||
|
|
||||||
# --- Args ---
|
# --- Args ---
|
||||||
|
|
||||||
KEY_URL="${1:-https://getbin.xyz/infmap-pub}"
|
KEY_URL="${1:-https://getbin.xyz/infmap-pub}"
|
||||||
|
|||||||
Reference in New Issue
Block a user