From 58e107fa44a90be8a686b87f8fb66a26ec8ce37b Mon Sep 17 00:00:00 2001 From: ZoeySimone <78411653+ZoeySimone@users.noreply.github.com> Date: Thu, 23 May 2024 18:49:44 +0100 Subject: [PATCH] Get last commit on push request instead of actor --- .github/workflows/generate_docs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_docs.yaml b/.github/workflows/generate_docs.yaml index d631b23..6ed5223 100644 --- a/.github/workflows/generate_docs.yaml +++ b/.github/workflows/generate_docs.yaml @@ -9,14 +9,14 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4.1.1 - if: ${{ github.actor != 'github-actions[bot]' }} + if: ${{ github.event.commits[0].author.name != 'github-actions[bot]' }} with: ssh-key: ${{ secrets.GH_ACTION_KEY }} fetch-depth: 2 ref: ${{ github.head_ref }} - name: "actor name" run: | - echo "${{ github.actor }}" + echo "${{ github.event.commits[0].author.name }}" - uses: actions/setup-go@v5 with: go-version: '1.21.10'