Skip to content

Commit 0dc7600

Browse files
Release v2.0.1 Published from PolymeshAssociation/polymesh-action@ae0fbd3ca3113cf12c69efa0e092217b2f7cf374
1 parent 346ab7f commit 0dc7600

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

action.yml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,62 @@ inputs:
3333
head-branch:
3434
description: 'Head branch for authentication validation'
3535
required: false
36+
checkout-ref:
37+
description: 'Git ref to checkout (branch, tag, SHA, or PR head). Defaults to the triggered ref.'
38+
required: false
39+
checkout-fetch-depth:
40+
description: 'Number of commits to fetch. 0 indicates full history (required for commit signature validation).'
41+
required: false
42+
default: '0'
43+
checkout-token:
44+
description: 'Token for checkout. Defaults to github-token input value.'
45+
required: false
3646

3747
outputs:
3848
auth-status:
3949
description: 'Authentication result: success, failed, skipped'
50+
value: ${{ steps.polymesh.outputs.auth-status }}
4051
merge-status:
4152
description: 'Merge result: success, failed, skipped, not-requested'
53+
value: ${{ steps.polymesh.outputs.merge-status }}
4254
failed-commits:
4355
description: 'JSON array of failed commit information'
56+
value: ${{ steps.polymesh.outputs.failed-commits }}
4457
merge-sha:
4558
description: 'SHA of the merge commit if successful'
59+
value: ${{ steps.polymesh.outputs.merge-sha }}
4660

4761
runs:
48-
using: 'node20'
49-
main: 'dist/index.js'
62+
using: 'composite'
63+
steps:
64+
- name: Log checkout configuration
65+
shell: bash
66+
run: |
67+
if [ -n "${{ inputs.checkout-token }}" ]; then
68+
echo "Using provided checkout-token for repository checkout"
69+
else
70+
echo "Using github-token for repository checkout"
71+
fi
72+
echo "Fetch depth: ${{ inputs.checkout-fetch-depth || '0' }}"
73+
echo "Ref: ${{ inputs.checkout-ref || '(default)' }}"
74+
75+
- name: Checkout repository
76+
uses: actions/checkout@v4
77+
with:
78+
fetch-depth: ${{ inputs.checkout-fetch-depth || '0' }}
79+
ref: ${{ inputs.checkout-ref }}
80+
token: ${{ inputs.checkout-token || inputs.github-token }}
81+
82+
- name: Run Polymesh Action
83+
id: polymesh
84+
run: node ${{ github.action_path }}/dist/index.js
85+
shell: bash
86+
env:
87+
INPUT_ALLOWED-SIGNERS: ${{ inputs.allowed-signers }}
88+
INPUT_GITHUB-TOKEN: ${{ inputs.github-token }}
89+
INPUT_COMMENT-MODE: ${{ inputs.comment-mode }}
90+
INPUT_MERGE-METHOD: ${{ inputs.merge-method }}
91+
INPUT_REQUIRED-KEY-TYPE: ${{ inputs.required-key-type }}
92+
INPUT_AUTH-REQUIRED: ${{ inputs.auth-required }}
93+
INPUT_BASE-BRANCH: ${{ inputs.base-branch }}
94+
INPUT_HEAD-BRANCH: ${{ inputs.head-branch }}

0 commit comments

Comments
 (0)