From 3b842acea6ea16647f107c6535b23056b637d551 Mon Sep 17 00:00:00 2001 From: Marc Biedermann Date: Wed, 1 Nov 2023 13:24:26 +0100 Subject: [PATCH] add commit sha for staging deployment builds --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4c7c9487..ed817100b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: