Skip to content

Commit 984d9c5

Browse files
committed
Add a step to guide users in case the pinact workflow is failing
1 parent 897cfc9 commit 984d9c5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/validate-pinned-actions.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
persist-credentials: false
2020

2121
- name: Pin actions
22+
id: pin-actions
2223
# Relies on the following actions that need to be allowed in the repo:
2324
# aquaproj/aqua-installer@e2d0136abcf70b7a2f6f505720640750557c4b33
2425
# suzuki-shunsuke/commit-action@04e7ae80e6b3c584ba8a4d98ab64474963d854eb
@@ -27,3 +28,24 @@ jobs:
2728
uses: suzuki-shunsuke/pinact-action@d735505f3decf76fca3fdbb4c952e5b3eba0ffdd # v0.1.2
2829
with:
2930
skip_push: true
31+
32+
- name: Output pin actions failure message
33+
if: failure() && steps.pin-actions.outcome == 'failure'
34+
run: |
35+
cat >> $GITHUB_STEP_SUMMARY << 'EOF'
36+
## ⚠️ Action Pinning Validation Failed
37+
38+
This check ensures actions are pinned to a specific commit SHA for security and reliability. This validation did not pass for your workflow.
39+
40+
Here's how to resolve this:
41+
42+
**1. If you added or modified an action:**
43+
* Ensure it's pinned to a full commit SHA (e.g., `actions/checkout@a12b34cdef567890...`), not a tag or branch.
44+
* For new actions or versions, please ping `@agent-integrations` in your pull request to validate and allow-list its usage.
45+
46+
**2. If you have *not* changed any actions in this branch:**
47+
* An allowed action version may have been updated centrally, and your branch is now using an older, unpermitted version.
48+
* Update your branch with the latest changes from `master` (or your repository's main branch) to get the current allowed actions.
49+
50+
If the issue persists after these steps, please contact `@agent-integrations` for assistance.
51+
EOF

0 commit comments

Comments
 (0)