Fix checkpoint disk image names so they are short enough for Google Cloud
@@ -1096,7 +1096,7 @@ jobs:
# uses sentence case, so we need to downcase ${{ inputs.network }}.
#
# Disk image names in GCP are limited to 63 characters, so we need to limit
- # branch names to 13 characters.
+ # branch names to 12 characters.
#
# Passes ${{ inputs.network }} to subsequent steps using $NETWORK env variable.
# Passes ${{ env.GITHUB_REF_SLUG_URL }} to subsequent steps using $SHORT_GITHUB_REF env variable.
@@ -1105,7 +1105,7 @@ jobs:
NETWORK_CAPS=${{ inputs.network }}
echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV
LONG_GITHUB_REF=${{ env.GITHUB_REF_SLUG_URL }}
- echo "SHORT_GITHUB_REF=${LONG_GITHUB_REF:0:13}" >> $GITHUB_ENV
+ echo "SHORT_GITHUB_REF=${LONG_GITHUB_REF:0:12}" >> $GITHUB_ENV
# Setup gcloud CLI
- name: Authenticate to Google Cloud
@@ -1144,8 +1144,8 @@ jobs:
UPDATE_SUFFIX="-u"
fi
- # We're going to delete old images after a month, so we don't need the year here
- TIME_SUFFIX=$(date '+%m%d%H%M%S' --utc)
+ # We're going to delete old images after a few days, so we only need the time here
+ TIME_SUFFIX=$(date '+%H%M%S' --utc)
echo "UPDATE_SUFFIX=$UPDATE_SUFFIX" >> $GITHUB_ENV
echo "TIME_SUFFIX=$TIME_SUFFIX" >> $GITHUB_ENV
