Skip to content

Commit

Permalink
gh-actions/github/pr: Add wip arg and cleanups (#893)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax authored Oct 25, 2023
1 parent e609926 commit 7a77284
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions gh-actions/github/pr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ inputs:
dry-run:
type: boolean
default: false
wip:
type: boolean
default: false


runs:
Expand Down Expand Up @@ -66,11 +69,11 @@ runs:
shell: bash
- name: Upload diff
uses: envoyproxy/toolshed/gh-actions/upload/[email protected]
if: inputs.diff-upload
if: ${{ inputs.diff-upload }}
with:
diff: HEAD^1
name: inputs.diff-upload
show: inputs.diff-show
name: ${{ inputs.diff-upload }}
show: ${{ inputs.diff-show }}
- run: |
git diff HEAD^1
if: ${{ ! inputs.diff-upload && inputs.diff-show }}
Expand All @@ -92,7 +95,10 @@ runs:
-H "$BRANCH_NAME" \
--title "$PR_TITLE" \
--body "$PR_BODY"
if: ${{ ! inputs.dry-run }}
if [[ "${{ inputs.wip }}" == "true" ]]; then
gh pr ready "$BRANCH_NAME" --undo
fi
if: ${{ ! inputs.dry-run || inputs.dry-run == 'false' }}
env:
GH_TOKEN: ${{ inputs.GITHUB_TOKEN }}
PR_TITLE: ${{ inputs.title }}
Expand Down

0 comments on commit 7a77284

Please sign in to comment.