Skip to content

Commit cc19488

Browse files
authored
Merge pull request machinekit#315 from cerna/github-actions
Just use first non-merge commit
2 parents 8dad9d4 + bea0463 commit cc19488

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/build-preview-pages.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
runs-on: ubuntu-latest
1717
env:
1818
ACTING_SHA: ${{ github.sha }}
19-
POSITION_FROM_TOP: 1
2019
OUTPUT_NAME: 'machinekit-site-${{ github.sha }}'
2120
ACTING_REPOSITORY: ${{ github.repository }}
2221
steps:
@@ -53,8 +52,8 @@ jobs:
5352
echo "###########################################################"
5453
echo "# Commit which will be used for mining of the credentials #"
5554
echo "###########################################################"
56-
git log -n 1 ${{ env.ACTING_SHA }}~$((${{ env.POSITION_FROM_TOP }}-1))
57-
jq -n --arg authoremail "$(git log --format='%ae' -n 1 ${{ env.ACTING_SHA }}~$((${{ env.POSITION_FROM_TOP }}-1)))" --arg authorname "$(git log --format='%an' -n 1 ${{ env.ACTING_SHA }}~$((${{ env.POSITION_FROM_TOP }}-1)))" --arg commitmsg "$(git log --format='%B' -n 1 ${{ env.ACTING_SHA }}~$((${{ env.POSITION_FROM_TOP }}-1)))" --arg sha "${{ env.ACTING_SHA }}" '{"author":"\($authorname)","email":"\($authoremail)","message":"\($commitmsg)","sha":"\($sha)"}' > ${{ env.FILENAME }}
55+
git log -n 1 --no-merges HEAD
56+
jq -n --arg authoremail "$(git log --format='%ae' -n 1 --no-merges HEAD)" --arg authorname "$(git log --format='%an' -n 1 --no-merges HEAD)" --arg commitmsg "$(git log --format='%B' -n 1 --no-merges HEAD)" --arg sha "${{ env.ACTING_SHA }}" '{"author":"\($authorname)","email":"\($authoremail)","message":"\($commitmsg)","sha":"\($sha)"}' > ${{ env.FILENAME }}
5857
echo "###########################################################"
5958
echo "# JSON file with metadata information of pertinent commit #"
6059
echo "###########################################################"

0 commit comments

Comments
 (0)