From 72666d3162db01bdc4c7ea495ead1b805c99bf15 Mon Sep 17 00:00:00 2001 From: Christian Zunker <827818+czunker@users.noreply.github.com> Date: Mon, 4 Dec 2023 13:37:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20create=20PR=20in=20GHA=20(?= =?UTF-8?q?#2737)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Zunker --- .github/workflows/update-deps.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-deps.yaml b/.github/workflows/update-deps.yaml index 920839cea7..27338db4b7 100644 --- a/.github/workflows/update-deps.yaml +++ b/.github/workflows/update-deps.yaml @@ -41,15 +41,17 @@ jobs: run: | git config --global user.email "tools@mondoo.com" git config --global user.name "Mondoo Tools" - BRANCH_NAME="version/deps_update_$(date +%Y%m%d)" + BRANCH_NAME="version/deps_update_$(date +%Y%m%d_%H%M)" git checkout -b ${BRANCH_NAME} git add go.mod go.sum || true git add providers/ || true - git commit -m "🧹 Update deps for cnquery and providers $(date +%Y%m%d)" + COMMIT_MSG="🧹 Update deps for cnquery and providers $(date +%Y%m%d)" + echo "COMMIT_TITLE=${COMMIT_MSG}" >> $GITHUB_OUTPUT + git commit -m "${COMMIT_MSG}" git push --set-upstream origin ${BRANCH_NAME} shell: bash - name: Create pull request - run: gh pr create -B main --fill --body 'Created by Mondoo Tools via Github actions' + run: gh pr create --base main --title "${{ steps.branch.outputs.COMMIT_TITLE }}" --body "Created by Mondoo Tools via Github actions\n\nWorkflow ${{ github.workflow }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}