Skip to content

Commit

Permalink
🐛 Fix create PR in GHA (#2737)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Zunker <[email protected]>
  • Loading branch information
czunker authored Dec 4, 2023
1 parent 82b2149 commit 72666d3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/update-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ jobs:
run: |
git config --global user.email "[email protected]"
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 }}

0 comments on commit 72666d3

Please sign in to comment.