diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df10be5..4219395 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,8 +59,17 @@ jobs: - uses: ./.github/actions/setup - name: set VERSION=${{ needs.version.outputs.version }} run: | - bin/garden-version "${{ needs.version.outputs.version }}" | tee VERSION - git update-index --assume-unchanged VERSION + VERSION_FILE="" + if [ -f "VERSION" ]; then + VERSION_FILE="VERSION" + elif [ -f "gardenlinux/VERSION" ]; then + VERSION_FILE="gardenlinux/VERSION" + else + echo "Error: VERSION file does not exist" + exit 1 + fi + bin/garden-version "${{ needs.version.outputs.version }}" | tee ${VERSION_FILE} + git update-index --assume-unchanged ${VERSION_FILE} - name: build certificates if: ${{ ! inputs.use_kms }} run: ./cert/build @@ -201,8 +210,17 @@ jobs: arch: "${{ matrix.arch }}" - name: set VERSION=${{ needs.version.outputs.version }} run: | - bin/garden-version "${{ needs.version.outputs.version }}" | tee VERSION - git update-index --assume-unchanged VERSION + VERSION_FILE="" + if [ -f "VERSION" ]; then + VERSION_FILE="VERSION" + elif [ -f "gardenlinux/VERSION" ]; then + VERSION_FILE="gardenlinux/VERSION" + else + echo "Error: VERSION file does not exist" + exit 1 + fi + bin/garden-version "${{ needs.version.outputs.version }}" | tee ${VERSION_FILE} + git update-index --assume-unchanged ${VERSION_FILE} - name: load cert cache uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # pin@v3 with: