Skip to content

Commit

Permalink
add commit sha for staging deployment builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mabiede committed Nov 1, 2023
1 parent b319f76 commit 3b842ac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: add commit SHA for non-production builds
if: github.ref_type != 'tag'
run: |
CURRENT_VERSION=$(grep -oP 'let to_string = "\K[^"]+' ./pool/version/version.ml)
GIT_SHA=$(git rev-parse --short HEAD)
sed -i "s/^let to_string = \".*\"/let to_string = \"${CURRENT_VERSION}-${GIT_SHA}\"/" ./pool/version/version.ml
- name: Build and test with Docker
uses: addnab/docker-run-action@v3
env:
Expand Down

0 comments on commit 3b842ac

Please sign in to comment.