From 2f2e2ff48b9213e1cdf739dcc33ccdde7af355e1 Mon Sep 17 00:00:00 2001
From: Yaroslav Lobankov <y.lobankov@tarantool.org>
Date: Fri, 15 Oct 2021 11:21:54 +0400
Subject: [PATCH] ci: pass SHA to reusable_build.yml instead of ref

Imagine the following situation. One pushed a commit to the master
branch, the 'integration.yml' workflow is triggered and starts to work.
The first step of this workflow is to build tarantool from the pushed
commit. Sometimes we have to wait for a free runner for some period of
time because our resources are limited. One pushed a commit to the
master branch one more time, but tarantool build for the previous
commit hasn't started yet. When tarantool build from the previous
commit starts, actually tarantool will be built from the last commit
because ${{ github.ref }} is passed to the 'reusable_build.yml'
workflow as an input parameter. So we need to pass ${{ github.sha }}.
---
 .github/workflows/integration.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index 0727fb435f..bdff4b9b9a 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -13,7 +13,7 @@ jobs:
   tarantool:
     uses: tarantool/tarantool/.github/workflows/reusable_build.yml@master
     with:
-      ref: ${{ github.ref }}
+      ref: ${{ github.sha }}
       os: ubuntu
       dist: focal
 
-- 
GitLab