From 60e33318cb62f4f57533ea770f7dedd50ece7a3a Mon Sep 17 00:00:00 2001 From: Vadim Vetrov Date: Sat, 4 Jan 2025 14:01:10 +0300 Subject: [PATCH] Fix workflow commit hash --- .github/workflows/build-ci.yml | 9 +++++---- uspace.mk | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index b06ccf5..1fca26c 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -32,11 +32,12 @@ jobs: run: | echo "version=$(cat Makefile | grep "PKG_VERSION :=" | sed 's/PKG_VERSION := //')" >> $GITHUB_OUTPUT echo "release=$(cat Makefile | grep "PKG_RELEASE :=" | sed 's/PKG_RELEASE := //')" >> $GITHUB_OUTPUT - if [[ "${{ github.event_name }}" != "pull_request" ]]; then - echo "sha=$(echo ${GITHUB_SHA::7})" >> $GITHUB_OUTPUT - else - echo "sha=$(gh api repos/$REPO/commits/main --jq '.sha[:7]')" >> $GITHUB_OUTPUT + + if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then + GITHUB_SHA=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.head.sha) fi + echo "sha=$(echo ${GITHUB_SHA::7})" >> $GITHUB_OUTPUT + cat $GITHUB_OUTPUT build-static: needs: prepare diff --git a/uspace.mk b/uspace.mk index 4ec4915..c1d2756 100644 --- a/uspace.mk +++ b/uspace.mk @@ -74,7 +74,7 @@ prepare_dirs: mkdir -p $(DEPSDIR) $(LIBCYCLONE): - $(MAKE) -C deps/cyclone + $(MAKE) -C deps/cyclone CFLAGS="$(CFLAGS)" mkdir -p $(DEPSDIR)/lib cp deps/cyclone/libcyclone.a $(DEPSDIR)/lib/libcyclone.a