From 5e6d0835c3c1922259560a84ef14dcc2e554cd27 Mon Sep 17 00:00:00 2001 From: nicolgit Date: Thu, 1 Aug 2024 11:42:25 +0200 Subject: [PATCH] build number --- ...tatic-web-apps-calm-mushroom-0f7713e03.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-calm-mushroom-0f7713e03.yml b/.github/workflows/azure-static-web-apps-calm-mushroom-0f7713e03.yml index 6d48273..9ebce23 100644 --- a/.github/workflows/azure-static-web-apps-calm-mushroom-0f7713e03.yml +++ b/.github/workflows/azure-static-web-apps-calm-mushroom-0f7713e03.yml @@ -19,24 +19,17 @@ jobs: with: submodules: true lfs: false - - - name: prepare build date in GITHUB_ENV - id: step_build_date_and_time - run: | - echo "build_timestamp=$(date)" >> $GITHUB_ENV - echo "build_number=${{ github.run_number }}" - env: - GITHUB_RUN_NUMBER: ${{ github.run_number }} + 12 - - - name: Use the build date from GITHUB_ENV + - name: replace build date and number id: step_replace # encode connection string with https://dwaves.de/tools/escape/ !! run: | build=$(date +%Y.%m.%d).github - echo "build date: ${{ env.build_timestamp }} - $build" - echo "build number: ${{ env.GITHUB_RUN_NUMBER }}" + my_build_number=$((12+${{ github.run_number }})) + echo "build date (gitgub/environment): ${{ env.build_timestamp }} / $build" + echo "action build number: ${{ env.GITHUB_RUN_NUMBER }}" + echo "my build number: $my_build_number" sed -i "s/__BUILDDATE__/$build/g" index.html - sed -i 's/__BUILDNUMBER__/${{ github.run_number }}/g' index.html + sed -i 's/__BUILDNUMBER__/$my_build_number/g' index.html - name: Build And Deploy id: builddeploy uses: Azure/static-web-apps-deploy@v1