diff --git a/.github/workflows/bi-weekly-release/action.yml b/.github/workflows/bi-weekly-release/action.yml index e647ac8a759..3a5314f62ad 100644 --- a/.github/workflows/bi-weekly-release/action.yml +++ b/.github/workflows/bi-weekly-release/action.yml @@ -13,11 +13,12 @@ runs: steps: - shell: bash run: | + LAST_AUTOMATED_RELEASE=${{ inputs.LAST_AUTOMATED_RELEASE }} echo "LAST_AUTOMATED_RELEASE=${{ inputs.LAST_AUTOMATED_RELEASE }}" >> $GITHUB_ENV # last_release=$(git ls-remote --tags | grep -v "\-rc" | grep -v "refs/tags/v" | grep "cloud" | tail -n1 | awk ‘{print $2}’) current_date=$(date +%s) - release_date=$(git log -1 --format=%ct $last_release) - time_diff=$(( (current_date - release_date) / (60*60*24) )) + release_date=$(git log -1 --format=%ct LAST_AUTOMATED_RELEASE) + time_diff=$(( (current_date - LAST_AUTOMATED_RELEASE) / (60*60*24) )) if [ "$time_diff" -ge 14 ]; then echo "14 days have passed since the release." # Perform additional actions here diff --git a/.github/workflows/daily-hosting-release.yml b/.github/workflows/daily-hosting-release.yml index 18e83881778..e9c50b6966c 100644 --- a/.github/workflows/daily-hosting-release.yml +++ b/.github/workflows/daily-hosting-release.yml @@ -61,7 +61,7 @@ jobs: run: | REPOSITORY_ID=${{ github.repository_id }} EVENT_NAME=${{ github.event_name }} - CURRENT_DATE=$(date -u +"%Y-%m-%d %H:%M:%S") + CURRENT_DATE=$(date +%s) echo "REPOSITORY_ID=$REPOSITORY_ID" >> $GITHUB_ENV echo "EVENT_NAME=$EVENT_NAME" >> $GITHUB_ENV echo "CURRENT_DATE=$CURRENT_DATE" >> $GITHUB_ENV