gha: ci: nightly: Use github.sha to get the last commit reference

As we need to pass down the commit sha to the jobs that will be
triggered from the `schedule` event, we must be careful on what exactly
we're using there.

At first we were using ${{ github.ref }}, but this turns out to be the
**branch name**, rather than the commit hash.  In order to actually get
the commit hash, Let's use ${{ github.sha }} instead, as described by
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#

Fixes: #7247

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-07-10 09:30:17 +02:00
parent afbc1f94d7
commit 37a9556789

View File

@ -7,7 +7,7 @@ jobs:
kata-containers-ci-on-push:
uses: ./.github/workflows/ci.yaml
with:
commit-hash: ${{ github.ref }}
pr-number: ${{ github.ref }}
tag: ${{ github.ref }}-nightly
commit-hash: ${{ github.sha }}
pr-number: ${{ github.sha }}
tag: ${{ github.sha }}-nightly
secrets: inherit