From 3714bd83be55301e3f7a1f008e17012ee47ed0ca Mon Sep 17 00:00:00 2001 From: Refringe Date: Sat, 2 Mar 2024 14:52:00 -0500 Subject: [PATCH] Update build.yaml to display last commit message and tags --- .gitea/workflows/build.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index b2c6c5d..37c739e 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -31,21 +31,21 @@ jobs: echo "NPM version: $(npm --version)" echo "Latest Commit Hash: $(git rev-parse HEAD)" echo "Associated Tags: $(git tag --contains HEAD)" - echo "Branch Name: $(git branch --show-current)" - echo "Last Commit Message: $(git log -1 --pretty=%B)" + echo "Last Commit Message:" && git log -1 --pretty=%B - name: Cache Keys id: cache-keys run: | cd ./server echo "::set-output name=commit_hash::$(git rev-parse HEAD)" - TAGS=$(git tag --contains HEAD) - if [[ "$TAGS" == "" ]]; then + TAGS=$(git tag --contains HEAD || echo "no-tag") + if [ -z "$TAGS" ]; then TAGS="no-tag" fi - echo "::set-output name=tags::${TAGS//[$'\n\r']/}" + printf "::set-output name=tags::%s" "${TAGS//$'\n'/,}" echo "Commit Hash: ${{ steps.cache-keys.outputs.commit_hash }}" echo "Tags: ${{ steps.cache-keys.outputs.tags }}" + shell: bash - name: Build Cache id: build-cache