From 38381f44b99b531e1cef42da663739efed54dbce Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Thu, 5 Feb 2026 12:05:47 +0500 Subject: [PATCH] ci-bonsai-daily - generate timestamp once for all builds To avoid running in a situation when some builds are using one tag and some are using another and then unstable repo script fails to find builds for some platforms. --- .github/workflows/ci-bonsai-daily.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-bonsai-daily.yml b/.github/workflows/ci-bonsai-daily.yml index 3b52198f3a..ddfa64a47a 100644 --- a/.github/workflows/ci-bonsai-daily.yml +++ b/.github/workflows/ci-bonsai-daily.yml @@ -24,9 +24,15 @@ jobs: runs-on: ubuntu-latest if: | github.repository == 'IfcOpenShell/IfcOpenShell' + outputs: + timestamp: ${{ steps.timestamp.outputs.timestamp }} steps: - - name: Set env - run: echo ok go + - name: Get current timestamp + id: timestamp + # Include hours and minutes to release tag + # to avoid possibility of unstable repo's index.json + # pointing to the new file when index.json itself wasn't yet updated. + run: echo "timestamp=$(date +'%y%m%d%H%M')" >> $GITHUB_OUTPUT build: needs: activate @@ -67,12 +73,6 @@ jobs: - name: Get current version id: version run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT - - name: Get current date - id: date - # Include hours and minutes to release tag - # to avoid possibility of unstable repo's index.json - # pointing to the new file when index.json itself wasn't yet updated. - run: echo "date=$(date +'%y%m%d%H%M')" >> $GITHUB_OUTPUT - name: Compile run: | cd src/bonsai && make dist PLATFORM=${{ matrix.config.short_name }} PYVERSION=${{ matrix.pyver }} @@ -88,8 +88,8 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ${{ steps.find_zip.outputs.filepath }} asset_name: ${{ steps.find_zip.outputs.filename }} - release_name: "bonsai-${{steps.version.outputs.version}}-alpha${{steps.date.outputs.date}} (unstable)" - tag: "bonsai-${{steps.version.outputs.version}}-alpha${{steps.date.outputs.date}}" + release_name: "bonsai-${{steps.version.outputs.version}}-alpha${{ needs.activate.outputs.timestamp }} (unstable)" + tag: "bonsai-${{steps.version.outputs.version}}-alpha${{ needs.activate.outputs.timestamp }}" overwrite: true body: "See README in https://github.com/IfcOpenShell/bonsai_unstable_repo/ on how to setup autoupdates for daily Bonsai builds."