diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 583bb9bc5b..7280381a78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,24 @@ env: LINUX_BOOT_FILES_PATH: ${{ github.workspace }}/LinuxBootFiles jobs: + find-sha: + runs-on: ubuntu-latest + steps: + - name: Find SHA of the triggering workflow (i.e. PR) + run: | + if [ "$EVENT" == 'pull_request' ] + then + echo "::set-output name=sha::$(echo ${{github.event.pull_request.head.sha}})" + elif [ "$EVENT" == 'workflow_run' ] + then + echo "::set-output name=sha::$(echo ${{github.event.workflow_run.head_sha}})" + else + echo "::set-output name=sha::$(echo $GITHUB_SHA)" + fi + env: + EVENT: ${{ github.event_name }} + REF: ${{ github.ref }} + lint: runs-on: "windows-2022" strategy: