From 4ef08f7339a2c83fef6742db3756226222d8a750 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 4 Oct 2021 14:33:51 -0700 Subject: [PATCH] ci: Cleanup the previous test commits. --- .github/scripts/apidoc.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/apidoc.sh b/.github/scripts/apidoc.sh index b341fca3..31795ebd 100755 --- a/.github/scripts/apidoc.sh +++ b/.github/scripts/apidoc.sh @@ -10,7 +10,7 @@ echo "Post-processing (API) documentation." echo "PR Number: $PR_NUMBER" -echo "GITHUB_HEAD_REF: $GITHUB_HEAD_REF" +echo "GITHUB_HEAD_REF: $GITHUB_REF" if [ -z "$APIDOC_TOKEN" ]; then echo "No APIDOC_TOKEN available. Skipping." @@ -40,11 +40,11 @@ cd build/apidoc # This will re-use already existing branches (updated PR). if [ "$PR_NUMBER" != "" ]; then BRANCH="pr-$PR_NUMBER" -elif ["$GITHUB_HEAD_REF" != "" ] && [ "$GITHUB_HEAD_REF" != master ]; then +elif [ "$GITHUB_REF" != "" ] && [ "$GITHUB_REF" != "refs/heads/master" ]; then # Use merge-base of master in branch name, to keep different branches with # the same name apart. # shellcheck disable=SC2015 - BRANCH="$GITHUB_HEAD_REF-$(cd "$REPO_DIR" \ + BRANCH="$GITHUB_REF-$(cd "$REPO_DIR" \ && git fetch --unshallow origin master \ && git rev-parse --short "$(git merge-base HEAD FETCH_HEAD || true)" || true)" else @@ -91,7 +91,7 @@ COMMIT_MSG="Update docs for $AWESOME_VERSION via Github Actions Last commit message: $LAST_COMMIT_MSG -Commits: https://github.com/awesomeWM/awesome/compare/${GITHUB_BASE_REF}..${GITHUB_HEAD_REF} +Commits: https://github.com/awesomeWM/awesome/compare/${GITHUB_BASE_REF}..${GITHUB_REF} Build URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" git commit -m "[relevant] $COMMIT_MSG"