diff --git a/.github/workflows/weekly.yaml b/.github/workflows/weekly.yaml index 0badcf45..062a5782 100644 --- a/.github/workflows/weekly.yaml +++ b/.github/workflows/weekly.yaml @@ -26,6 +26,7 @@ jobs: private_key: ${{ secrets.TRUNK_OPEN_PR_APP_PRIVATE_KEY }} - name: Trunk Upgrade + id: upgrade uses: ./upgrade # external users: use trunk-io/trunk-action/upgrade@v1 with: github-token: ${{ steps.generate-token.outputs.token }} diff --git a/upgrade/action.yaml b/upgrade/action.yaml index b45c0ab3..5419bb6b 100644 --- a/upgrade/action.yaml +++ b/upgrade/action.yaml @@ -43,6 +43,15 @@ inputs: required: false default: "false" + branch-name: + description: The branch name to generate the PR from + default: trunk-io/update-trunk + required: false + + assignees: + description: A comma or newline separated list of GitHub assignee usernames + required: false + reviewers: description: A comma or newline separated list of GitHub reviewer usernames required: false @@ -61,6 +70,23 @@ inputs: description: A boolean to add a Signed-off-by line to the commit message required: false default: false +outputs: + pull-request-number: + description: The pull request number + value: ${{ steps.cpr.outputs.pull-request-number }} + + pull-request-url: + description: The URL of the pull request. + value: ${{ steps.cpr.outputs.pull-request-url }} + + pull-request-operation: + description: + The pull request operation performed by the action, `created`, `updated` or `closed`. + value: ${{ steps.cpr.outputs.pull-request-operation }} + + pull-request-head-sha: + description: The commit SHA of the pull request branch. + value: ${{ steps.cpr.outputs.pull-request-head-sha }} runs: using: composite @@ -115,16 +141,18 @@ runs: ${{ github.action_path }}/../cleanup.sh - name: Create Pull Request + id: cpr uses: peter-evans/create-pull-request@v6 with: title: ${{ inputs.prefix }}${{ env.PR_TITLE }} body: ${{ env.PR_DESCRIPTION }} base: ${{ inputs.base }} - branch: trunk-io/update-trunk + branch: ${{ inputs.branch-name }} labels: trunk add-paths: ${{ inputs.add-paths }} commit-message: ${{ inputs.prefix }}${{ env.PR_TITLE }} delete-branch: true + assignees: ${{ inputs.assignees }} reviewers: ${{ inputs.reviewers }} token: ${{ inputs.github-token }} signoff: ${{ inputs.signoff }}