mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 11:58:41 +00:00
gha: Pass event specific info from the caller workflow
Let's ensure we're not relying, on any of the called workflows, on event specific information. Right now, the two information we've been relying on are: * PR number, coming from github.event.pull_request.number * Commit hash, coming from github.event.pull_request.head.sha As we want to, in the future, add nightly jobs, which will be triggered by a different event (thus, having different fields populated), we should ensure that those are not used unless it's in the "top action" that's trigerred by the event. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
@@ -13,6 +13,9 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: no
|
||||
commit-hash:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-asset:
|
||||
@@ -60,7 +63,7 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
ref: ${{ inputs.commit-hash }}
|
||||
fetch-depth: 0 # This is needed in order to keep the commit ids history
|
||||
|
||||
- name: Build ${{ matrix.asset }}
|
||||
@@ -88,7 +91,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
ref: ${{ inputs.commit-hash }}
|
||||
- name: get-artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
|
Reference in New Issue
Block a user