Skip to content

Commit

Permalink
fix(ci): Set the DRE cli version based on the tag or git rev
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa-tomic committed Jan 15, 2024
1 parent 9d49f4d commit a741f80
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/bazel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ jobs:
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel', 'Cargo.Bazel.lock') }}
restore-keys: |
${{ runner.os }}-bazel-
- name: Set GIT_HASH variable
run: |
# Set GIT_HASH variable based on the type of GitHub reference
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
echo "GIT_HASH=$GITHUB_REF_NAME" >> "$GITHUB_ENV" # Embed tag name as GIT_HASH
else
echo "GIT_HASH=$GITHUB_SHA" >> "$GITHUB_ENV" # Embed commit SHA as GIT_HASH
fi
- run: bazel build ...
- run: bazel test ...
- name: Optimize bazel cache directory before uploading
Expand Down

0 comments on commit a741f80

Please sign in to comment.