File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 55 types : [ bump-dependency ]
66
77jobs :
8+ auth :
9+ name : Authenticate Caller
10+ runs-on : ubuntu-22.04
11+ steps :
12+ - name : Check client token
13+ env :
14+ PAYLOAD_TOKEN : ${{ github.event.client_payload.token }}
15+ EXPECTED_TOKEN : ${{ secrets.CLIENT_AUTH_TOKEN }}
16+ run : |
17+ set -euo pipefail
18+ # refuse to proceed without a token
19+ if [ -z "${PAYLOAD_TOKEN:-}" ]; then
20+ echo "Unauthorized: missing token"
21+ exit 1
22+ fi
23+ # simple equality check; doesn't echo secrets
24+ if [ "${PAYLOAD_TOKEN}" != "${EXPECTED_TOKEN}" ]; then
25+ echo "Unauthorized: bad token"
26+ exit 1
27+ fi
28+ echo "Caller authenticated"
29+
830 get-label :
31+ needs : auth
932 name : Get Label
1033 outputs :
1134 label : ${{ steps.get-label.outputs.label }}
You can’t perform that action at this time.
0 commit comments