Skip to content

Commit

Permalink
build number
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolgit committed Aug 1, 2024
1 parent d24a97f commit 5e6d083
Showing 1 changed file with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e6d083

Please sign in to comment.