From 73d7fd05727c9181caab25537a118201a37aaa38 Mon Sep 17 00:00:00 2001 From: Anthony Pham Date: Mon, 4 Nov 2024 14:04:22 +0100 Subject: [PATCH] setup user name and email --- .github/workflows/dispatch-update.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dispatch-update.yml b/.github/workflows/dispatch-update.yml index 7b310bcd8..4a9f190d2 100644 --- a/.github/workflows/dispatch-update.yml +++ b/.github/workflows/dispatch-update.yml @@ -3,6 +3,9 @@ name: Update Docs Version on: repository_dispatch: types: [update-version] + push: + branches: + - fix_dispatch_trigger jobs: update-docs-version: @@ -14,6 +17,9 @@ jobs: - name: Extract tag name run: echo "TAG_NAME=${{ github.event.client_payload.tag }}" >> $GITHUB_ENV + - name: Set TAG_NAME environment variable + run: echo "TAG_NAME=v1.1.3" >> $GITHUB_ENV + - name: Update docs to new version run: | TAG_NAME="$(echo "${TAG_NAME}" | sed 's/^v//')" @@ -34,17 +40,14 @@ jobs: # Update version with yarn yarn run version v${TAG_NAME} - # Commit and push changes - git checkout -b update-version-${{ env.TAG_NAME }} - git add . - git commit -m "Update docs to use version v${TAG_NAME}" - git push origin update-version-${{ env.TAG_NAME }} - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.GITHUB_TOKEN }} base: main - head: update-version-${{ env.TAG_NAME }} - title: "Update docs to use version v${TAG_NAME}" - body: "Automatically generated PR to update documentation for version v${TAG_NAME}" + branch: update-version-v${{ env.TAG_NAME }} + title: "Update docs to use version v${{ env.TAG_NAME }}" + body: "Automatically generated PR to update documentation for version v${{ env.TAG_NAME }}" + commit-message: "Update docs to use version v${{ env.TAG_NAME }}" + author-name: "obol-platform" + author-email: "platform@obol.tech"