Skip to content

Commit 3905a4c

Browse files
committed
chore: document custom action
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
1 parent 2ca2f0e commit 3905a4c

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/actions/create-pr/action.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
name: "Create PR custom action"
22
description: "Create a PR and a temporary branch, close duplicates"
33

4-
# This custom action
4+
# PROCESS
5+
#
6+
# 1. Setup git client using Powertools bot username
7+
# 2. Pushes staged files to a temporary branch
8+
# 3. Creates a PR from temporary branch against a target branch (typically trunk: develop, main, etc.)
9+
# 4. Searches for duplicate PRs with the same title
10+
# 5. If duplicates are found, link to the most recent one, close and delete their branches so we keep a single PR
11+
# 6. In the event of failure, we delete the now orphaned branch (if any), and propagate the failure
12+
13+
# USAGE
14+
#
15+
# - name: Create PR
16+
# id: create-pr
17+
# uses: ./.github/actions/create-pr
18+
# with:
19+
# files: "CHANGELOG.md"
20+
# temp_branch_prefix: "ci-changelog"
21+
# pull_request_title: "chore(ci): changelog rebuild"
22+
# github_token: ${{ secrets.GITHUB_TOKEN }}
23+
# - name: Step to demonstrate how to access outputs (no need for this)
24+
# run: |
25+
# echo "PR number: ${PR_ID}"
26+
# echo "Branch: ${BRANCH}"
27+
# env:
28+
# PR_ID: ${{ steps.create-pr.outputs.pull_request_id}}
29+
# BRANCH: ${{ steps.create-pr.outputs.temp_branch}}
530

631
inputs:
732
files:
8-
description: "Files to add"
33+
description: "Files to add separated by space"
934
required: true
1035
temp_branch_prefix:
1136
description: "Prefix for temporary git branch to be created, e.g, ci-docs"

0 commit comments

Comments
 (0)