Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/bump-dependency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,30 @@ on:
types: [ bump-dependency ]

jobs:
auth:
name: Authenticate Caller
runs-on: ubuntu-22.04
steps:
- name: Check client token
env:
PAYLOAD_TOKEN: ${{ github.event.client_payload.token }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this get passed to the workflow? Is it encrypted?

EXPECTED_TOKEN: ${{ secrets.CLIENT_AUTH_TOKEN }}
run: |
set -euo pipefail
# refuse to proceed without a token
if [ -z "${PAYLOAD_TOKEN:-}" ]; then
echo "Unauthorized: missing token"
exit 1
fi
# simple equality check; doesn't echo secrets
if [ "${PAYLOAD_TOKEN}" != "${EXPECTED_TOKEN}" ]; then
echo "Unauthorized: bad token"
exit 1
fi
echo "Caller authenticated"

get-label:
needs: auth
name: Get Label
outputs:
label: ${{ steps.get-label.outputs.label }}
Expand Down
Loading