Skip to content

Commit

Permalink
Added dry-run mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontes11 committed Jul 16, 2024
1 parent 3a18ef5 commit 5927510
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ inputs:
description: "User email to use in the commit."
required: false
default: "$GITHUB_ACTOR@users.noreply.github.com"
dry-run:
description: "Enable dry run mode."
required: false
default: "false"
runs:
using: 'composite'
steps:
Expand Down Expand Up @@ -82,6 +86,8 @@ runs:
git add .
git commit -m "operator ${{ inputs.name }}(${{ inputs.version }})" --signoff
git push -f
gh pr create --repo "${{ inputs.upstream-repo-name }}" \
--title "operator ${{ inputs.name }} (${{ inputs.version }})" \
--body "Added operator ${{ inputs.name }} (${{ inputs.version }})"
PR_CMD="gh pr create --repo '${{ inputs.upstream-repo-name }}' --title 'operator ${{ inputs.name }} (${{ inputs.version }})' --body 'Added operator ${{ inputs.name }} (${{ inputs.version }})'"
if [ "${{ inputs.dry-run }}" == "true" ]; then
PR_CMD="$PR_CMD --dry-run"
fi
eval "$PR_CMD"

0 comments on commit 5927510

Please sign in to comment.